Merge branch 'tb/refs-exclusion-and-packed-refs'
Enumerating refs in the packed-refs file, while excluding refs that match certain patterns, has been optimized. * tb/refs-exclusion-and-packed-refs: ls-refs.c: avoid enumerating hidden refs where possible upload-pack.c: avoid enumerating hidden refs where possible builtin/receive-pack.c: avoid enumerating hidden references refs.h: implement `hidden_refs_to_excludes()` refs.h: let `for_each_namespaced_ref()` take excluded patterns revision.h: store hidden refs in a `strvec` refs/packed-backend.c: add trace2 counters for jump list refs/packed-backend.c: implement jump lists to avoid excluded pattern(s) refs/packed-backend.c: refactor `find_reference_location()` refs: plumb `exclude_patterns` argument throughout builtin/for-each-ref.c: add `--exclude` option ref-filter.c: parameterize match functions over patterns ref-filter: add `ref_filter_clear()` ref-filter: clear reachable list pointers after freeing ref-filter.h: provide `REF_FILTER_INIT` refs.c: rename `ref_filter`
This commit is contained in:
@ -445,7 +445,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
|
||||
struct msg_arg msg = { .buf = STRBUF_INIT };
|
||||
struct ref_transaction *transaction;
|
||||
struct strbuf err = STRBUF_INIT;
|
||||
struct ref_filter filter;
|
||||
struct ref_filter filter = REF_FILTER_INIT;
|
||||
struct ref_sorting *sorting;
|
||||
struct string_list sorting_options = STRING_LIST_INIT_DUP;
|
||||
struct ref_format format = REF_FORMAT_INIT;
|
||||
@ -504,7 +504,6 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
|
||||
git_config(git_tag_config, &sorting_options);
|
||||
|
||||
memset(&opt, 0, sizeof(opt));
|
||||
memset(&filter, 0, sizeof(filter));
|
||||
filter.lines = -1;
|
||||
opt.sign = -1;
|
||||
|
||||
@ -660,6 +659,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
|
||||
|
||||
cleanup:
|
||||
ref_sorting_release(sorting);
|
||||
ref_filter_clear(&filter);
|
||||
strbuf_release(&buf);
|
||||
strbuf_release(&ref);
|
||||
strbuf_release(&reflog_msg);
|
||||
|
Reference in New Issue
Block a user