Skip to content

Commit 92cab49

Browse files
lfosgitster
authored andcommitted
config.txt: document the semantics of hideRefs with namespaces
Right now, there is no clear definition of how transfer.hideRefs should behave when a namespace is set. Explain that hideRefs prefixes match stripped names in that case. This is how hideRefs patterns are currently handled in receive-pack. Signed-off-by: Lukas Fleischer <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent aa826b6 commit 92cab49

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Documentation/config.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2673,6 +2673,14 @@ You may also include a `!` in front of the ref name to negate the entry,
26732673
explicitly exposing it, even if an earlier entry marked it as hidden.
26742674
If you have multiple hideRefs values, later entries override earlier ones
26752675
(and entries in more-specific config files override less-specific ones).
2676+
+
2677+
If a namespace is in use, the namespace prefix is stripped from each
2678+
reference before it is matched against `transfer.hiderefs` patterns.
2679+
For example, if `refs/heads/master` is specified in `transfer.hideRefs` and
2680+
the current namespace is `foo`, then `refs/namespaces/foo/refs/heads/master`
2681+
is omitted from the advertisements but `refs/heads/master` and
2682+
`refs/namespaces/bar/refs/heads/master` are still advertised as so-called
2683+
"have" lines.
26762684

26772685
transfer.unpackLimit::
26782686
When `fetch.unpackLimit` or `receive.unpackLimit` are

0 commit comments

Comments
 (0)