Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b45219f
Implement custom thread local storage for user of library
implausible Mar 29, 2021
7a76a33
checkout: cleanup duplication in checkout_create_the_new
implausible Aug 12, 2020
07493cc
thread checkout: move checkout buffers to tls
implausible Mar 29, 2021
e1a1eaa
thread checkout: add locks around shared state
implausible Aug 12, 2020
dc4e588
thread checkout: add locks around non thread-safe actions
implausible Apr 9, 2021
0739689
thread checkout: stub indirection for threading
implausible Aug 12, 2020
27f3c80
thread checkout: add threading to checkout_create_the_new
implausible Mar 29, 2021
37caa8d
meta: show build status for v1.3 branch
ethomson Feb 26, 2022
6b12762
online: test with https instead of git protocol
ethomson Jan 11, 2022
670415a
clone: update bitbucket tests
ethomson Mar 23, 2022
973d959
path: refactor ownership checks into current user and system
ethomson Apr 10, 2022
62d492d
repo: ensure that repo dir is owned by current user
ethomson Apr 11, 2022
e4eabb0
fs_path: mock ownership checks
ethomson Apr 12, 2022
caee92e
repo: test configuration ownership validation
ethomson Apr 11, 2022
f683806
repo: refactor global config loader function
ethomson Apr 11, 2022
eb8c3e5
repo: honor safe.directory during ownership checks
ethomson Apr 11, 2022
b58e905
repo: make ownership checks optional
ethomson Apr 12, 2022
a9eac6a
Merge pull request #6268 from libgit2/ethomson/ownership_13
ethomson Apr 12, 2022
1f39aac
meta: update version numbers for v1.3.1
ethomson Apr 12, 2022
23c24f8
meta: changelog for v1.3.1
ethomson Apr 12, 2022
1f5e7f9
Merge pull request #6271 from libgit2/ethomson/v1.3.1
ethomson Apr 12, 2022
6da6a10
Merge remote-tracking branch 'zawata/feature/custom-tls-for-external-…
zawata Apr 13, 2022
30d5c08
Merge remote-tracking branch 'zawata/multithread/checkout_create_the_…
zawata Apr 13, 2022
4b193b1
New checkout option: disabled_filters
julianmesa-gitkraken May 6, 2022
fe44f25
Merge branch 'disabled-filters-checkout' into libgit-next
ianhattendorf May 7, 2022
e78ee33
Fix degraded performance using GIT_USE_NSEC on repos cloned with GIT_…
julianmesa-gitkraken May 18, 2022
013d416
Merge pull request #7 from julianmesa-gitkraken/fix-nanoseconds-on-no…
ianhattendorf May 18, 2022
3ad710a
Fix the GIT_USE_NSEC performance fix
julianmesa-gitkraken May 26, 2022
4c98283
Merge pull request #8 from julianmesa-gitkraken/fix-nsecs-fix
ianhattendorf May 26, 2022
8254d2e
Do not add the .gitignore file if it not existing
julianmesa-gitkraken Jun 20, 2022
45f0e26
iterator: don't stat directories
julianmesa-gitkraken Jun 20, 2022
a4c112d
path: use fstatat instead of lstat
julianmesa-gitkraken Jun 20, 2022
110e29c
iterator: replace O(N) skip-to-start with O(log N)
julianmesa-gitkraken Jun 20, 2022
8bbbfab
push ignore frames lazily
julianmesa-gitkraken Jun 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion include/git2/checkout.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ typedef enum {
* notifications; don't update the working directory or index.
*/
GIT_CHECKOUT_DRY_RUN = (1u << 24),

/**
* THE FOLLOWING OPTIONS ARE NOT YET IMPLEMENTED
*/
Expand Down Expand Up @@ -339,6 +339,7 @@ typedef struct git_checkout_options {

/** Payload passed to perfdata_cb */
void *perfdata_payload;
git_strarray disabled_filters;
} git_checkout_options;

#define GIT_CHECKOUT_OPTIONS_VERSION 1
Expand Down
5 changes: 3 additions & 2 deletions src/checkout.c
Original file line number Diff line number Diff line change
Expand Up @@ -1567,7 +1567,7 @@ static int blob_content_to_file(

filter_session.attr_session = &data->attr_session;
filter_session.temp_buf = &buffers->tmp;

filter_session.disabled_filters = &data->opts.disabled_filters;
if (!data->opts.disable_filters) {
git_mutex_lock(&data->index_mutex);

Expand Down Expand Up @@ -2425,6 +2425,7 @@ static int checkout_write_merge(

filter_session.attr_session = &data->attr_session;
filter_session.temp_buf = &buffers->tmp;
filter_session.disabled_filters = &data->opts.disabled_filters;

if ((error = git_filter_list__load(
&fl, data->repo, NULL, result.path,
Expand Down Expand Up @@ -2998,7 +2999,7 @@ int git_checkout_iterator(

if (data.strategy & GIT_CHECKOUT_DRY_RUN)
goto cleanup;

data.total_steps = counts[CHECKOUT_ACTION__REMOVE] +
counts[CHECKOUT_ACTION__REMOVE_CONFLICT] +
counts[CHECKOUT_ACTION__UPDATE_BLOB] +
Expand Down
15 changes: 15 additions & 0 deletions src/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,8 @@ int git_filter_list__load(
git_filter_session *filter_session)
{
int error = 0;
int i;
int disabled_filter_found;
git_filter_list *fl = NULL;
git_filter_source src = { 0 };
git_filter_entry *fe;
Expand Down Expand Up @@ -541,6 +543,19 @@ int git_filter_list__load(
if (!fdef || !fdef->filter)
continue;

if (filter_session->disabled_filters) {
disabled_filter_found = 0;
for (i = 0; i < filter_session->disabled_filters->count; ++i) {
char *filter = filter_session->disabled_filters->strings[i];
if (!strcmp(filter, fdef->filter_name)) {
disabled_filter_found = 1;
break;
}
}
if (disabled_filter_found)
continue;
}

if (fdef->nattrs > 0) {
error = filter_list_check_attributes(
&values, repo,
Expand Down
1 change: 1 addition & 0 deletions src/filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ typedef struct {
git_filter_options options;
git_attr_session *attr_session;
git_buf *temp_buf;
git_strarray *disabled_filters;
} git_filter_session;

#define GIT_FILTER_SESSION_INIT {GIT_FILTER_OPTIONS_INIT, 0}
Expand Down