Merge branch 'jk/ref-filter-discard-commit-buffer'
* jk/ref-filter-discard-commit-buffer: ref-filter: disable save_commit_buffer while traversing
This commit is contained in:
commit
40ab711a9c
@ -2405,6 +2405,7 @@ static void reach_filter(struct ref_array *array,
|
||||
int filter_refs(struct ref_array *array, struct ref_filter *filter, unsigned int type)
|
||||
{
|
||||
struct ref_filter_cbdata ref_cbdata;
|
||||
int save_commit_buffer_orig;
|
||||
int ret = 0;
|
||||
|
||||
ref_cbdata.array = array;
|
||||
@ -2412,6 +2413,9 @@ int filter_refs(struct ref_array *array, struct ref_filter *filter, unsigned int
|
||||
|
||||
filter->kind = type & FILTER_REFS_KIND_MASK;
|
||||
|
||||
save_commit_buffer_orig = save_commit_buffer;
|
||||
save_commit_buffer = 0;
|
||||
|
||||
init_contains_cache(&ref_cbdata.contains_cache);
|
||||
init_contains_cache(&ref_cbdata.no_contains_cache);
|
||||
|
||||
@ -2444,6 +2448,7 @@ int filter_refs(struct ref_array *array, struct ref_filter *filter, unsigned int
|
||||
reach_filter(array, filter->reachable_from, INCLUDE_REACHED);
|
||||
reach_filter(array, filter->unreachable_from, EXCLUDE_REACHED);
|
||||
|
||||
save_commit_buffer = save_commit_buffer_orig;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user