Skip to content

negative hideRefs for overriding

Jeff King git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2docs/config.txt: reorder hideRefs configDocumentation/config.txt+15 -170 replies
2/2refs: support negative transfer.hideRefsDocumentation/config.txt refs.c t/t5512-ls-remote.sh+33 -54 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] negative hideRefs for overriding

At GitHub, we keep some information in a private part of the refs namespace. We use transfer.hideRefs so that users do not see it when fetching or pushing, and that works well. However, sometimes we want to expose part of the hidden namespace (e.g., for an internal fetch or push), and that cannot be done with the existing code. Usually config variables are last-one-wins, so you can simply overwrite any existing values with "git -c ...". But for multi-valued config like hideRefs, that just appends to the list, and the ref remains hidden.

This series adds negation to hideRefs, which gives us a reasonable last-one-wins setup. That allows "git -c" to unhide a specific set of refs (though note you have to use "--upload-pack='git -c ...'" since upload-pack does not share our environment). It also allows more complex config, like hiding all of "refs/foo" except for "refs/foo/bar". We don't use that ourselves, but it might come in handy (and logically falls out of the last-one-wins setup).

The first patch is some documentation cleanup. The interesting bit is in the second one.

[1/2]: docs/config.txt: reorder hideRefs config
[2/2]: refs: support negative transfer.hideRefs

-Peff