revision: refactor ref_excludes to ref_visibility
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 9 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | revision: rename ref_excludes to ref_visibilitybuiltin/ builtin/ refs.h +4 more | +61 | 1 reply | |
| 2/3 | revision: add ref_visible() helperrevision.c revision.h | +45 | 0 replies | |
| 3/3 | pack-refs: use new ref_visible() helperbuiltin/ refs/ t/ | +11 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] revision: refactor ref_excludes to ref_visibility
The ref_excludes API is used to tell which refs should be excluded. However, there are times when we would want to add refs to explicitly include as well. 4fe42f326e (pack-refs: teach pack-refs --include option, 2023-05-12) taught pack-refs how to include certain refs, but did it in a more manual way by keeping the ref patterns in a separate string list. Instead, we can easily extend the ref_excludes API to include refs as well, since this use case fits into the API nicely.
Refactor the API by renaming it to ref_visibility, and add a ref_visible() helper that takes into account ref inclusion.
John Cai (3):
revision: rename ref_excludes to ref_visibility
revision: add ref_visible() helper
pack-refs: use new ref_visible() helper
builtin/pack-refs.c | 20 ++++---- builtin/rev-parse.c | 18 +++---- refs.h | 2 +- refs/files-backend.c | 11 +---- revision.c | 98 +++++++++++++++++++++++---------------- revision.h | 37 +++++++++++---- t/helper/test-ref-store.c | 8 ++-- 7 files changed, 111 insertions(+), 83 deletions(-)
base-commit: 6640c2d06d112675426cf436f0594f0e8c614848
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1515%2Fjohn-cai%2Fjc%2Frefactor-ref-excludes-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1515/john-cai/jc/refactor-ref-excludes-v1
Pull-Request: https://github.com/git/git/pull/1515
Signature · 1 line
gitgitgadget