Hi, this is the second version of my patch series that tries to improve performance of the connectivity check by only considering preexisting refs as uninteresting that could actually have been advertised to the client. In v2 of this series, we introduced a new option `--visible-refs=` that mostly acted as if `--all` was given, but its output was restricted to only visible refs. As Peff rightly points out though, this is less flexible than it needs to be. This new version instead introduces a new option `--exclude-hidden=` that can be combined with `--all`, `--glob`, `--branches` and so on to provide a more flexible interface. The patch series is structured as following: - Patch 1-3 refactor multiple different parts of refs.c and revision.c so that they are more readily reusable. - Patch 4-5 implement `--exclude-hidden=` for git-rev-list(1) and git-rev-parse(1). - Patch 6 starts using that option in the connectivity check. Patrick Patrick Steinhardt (6): refs: get rid of global list of hidden refs revision: move together exclusion-related functions revision: introduce struct to handle exclusions revision: add new parameter to exclude hidden refs revparse: add `--exclude-hidden=` option receive-pack: only use visible refs for connectivity check Documentation/git-rev-parse.txt | 7 ++ Documentation/rev-list-options.txt | 7 ++ builtin/receive-pack.c | 10 +- builtin/rev-list.c | 1 + builtin/rev-parse.c | 12 ++- connected.c | 3 + connected.h | 7 ++ ls-refs.c | 13 ++- refs.c | 14 +-- refs.h | 5 +- revision.c | 118 +++++++++++++-------- revision.h | 29 ++++-- t/t6018-rev-list-glob.sh | 8 ++ t/t6021-rev-list-exclude-hidden.sh | 159 +++++++++++++++++++++++++++++ upload-pack.c | 30 +++--- 15 files changed, 341 insertions(+), 82 deletions(-) create mode 100755 t/t6021-rev-list-exclude-hidden.sh -- 2.38.1
Attachment:
signature.asc
Description: PGP signature