diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-02-06 03:40:45 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-02-06 03:40:45 +0300 |
commit | 6254fa13596cee0ea645317ba3eb4552430f38b4 (patch) | |
tree | 478d0213d0acbaed6cec84a10a92670520b736bd /refs.h | |
parent | 5198426d914ae15b52f85958c224a92f48e4f95e (diff) | |
parent | b3970c702cb0acc0551d88a5f34ad4ad2e2a6d39 (diff) |
Merge branch 'tb/ls-refs-optim'
The ls-refs protocol operation has been optimized to narrow the
sub-hierarchy of refs/ it walks to produce response.
* tb/ls-refs-optim:
ls-refs.c: traverse prefixes of disjoint "ref-prefix" sets
ls-refs.c: initialize 'prefixes' before using it
refs: expose 'for_each_fullref_in_prefixes'
Diffstat (limited to 'refs.h')
-rw-r--r-- | refs.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -348,6 +348,15 @@ int for_each_fullref_in(const char *prefix, each_ref_fn fn, void *cb_data, unsigned int broken); /** + * iterate all refs in "patterns" by partitioning patterns into disjoint sets + * and iterating the longest-common prefix of each set. + * + * callers should be prepared to ignore references that they did not ask for. + */ +int for_each_fullref_in_prefixes(const char *namespace, const char **patterns, + each_ref_fn fn, void *cb_data, + unsigned int broken); +/** * iterate refs from the respective area. */ int for_each_tag_ref(each_ref_fn fn, void *cb_data); |