Skip to content

Commit cc118a6

Browse files
peffgitster
authored andcommitted
docs/config.txt: reorder hideRefs config
The descriptions for receive.hideRefs and uploadpack.hideRefs are largely the same, and then transfer.hideRefs refers to both of them. Instead, let's make transfer.hideRefs the "master" source, and refer to it from the other sites (with appropriate program-specific annotations). This avoids duplication, and will make it easier to document changes to the config option without having to copy and paste the description in two places. While we're at it, this fixes some bogus subject/verb agreement in the original description. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a17c56c commit cc118a6

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

Documentation/config.txt

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2242,13 +2242,10 @@ receive.denyNonFastForwards::
22422242
set when initializing a shared repository.
22432243

22442244
receive.hideRefs::
2245-
String(s) `receive-pack` uses to decide which refs to omit
2246-
from its initial advertisement. Use more than one
2247-
definitions to specify multiple prefix strings. A ref that
2248-
are under the hierarchies listed on the value of this
2249-
variable is excluded, and is hidden when responding to `git
2250-
push`, and an attempt to update or delete a hidden ref by
2251-
`git push` is rejected.
2245+
This variable is the same as `transfer.hideRefs`, but applies
2246+
only to `receive-pack` (and so affects pushes, but not fetches).
2247+
An attempt to update or delete a hidden ref by `git push` is
2248+
rejected.
22522249

22532250
receive.updateServerInfo::
22542251
If set to true, git-receive-pack will run git-update-server-info
@@ -2536,9 +2533,13 @@ transfer.fsckObjects::
25362533
Defaults to false.
25372534

25382535
transfer.hideRefs::
2539-
This variable can be used to set both `receive.hideRefs`
2540-
and `uploadpack.hideRefs` at the same time to the same
2541-
values. See entries for these other variables.
2536+
String(s) `receive-pack` and `upload-pack` use to decide which
2537+
refs to omit from their initial advertisements. Use more than
2538+
one definition to specify multiple prefix strings. A ref that is
2539+
under the hierarchies listed in the value of this variable is
2540+
excluded, and is hidden when responding to `git push` or `git
2541+
fetch`. See `receive.hideRefs` and `uploadpack.hideRefs` for
2542+
program-specific versions of this config.
25422543

25432544
transfer.unpackLimit::
25442545
When `fetch.unpackLimit` or `receive.unpackLimit` are
@@ -2553,13 +2554,10 @@ uploadarchive.allowUnreachable::
25532554
`false`.
25542555

25552556
uploadpack.hideRefs::
2556-
String(s) `upload-pack` uses to decide which refs to omit
2557-
from its initial advertisement. Use more than one
2558-
definitions to specify multiple prefix strings. A ref that
2559-
are under the hierarchies listed on the value of this
2560-
variable is excluded, and is hidden from `git ls-remote`,
2561-
`git fetch`, etc. An attempt to fetch a hidden ref by `git
2562-
fetch` will fail. See also `uploadpack.allowTipSHA1InWant`.
2557+
This variable is the same as `transfer.hideRefs`, but applies
2558+
only to `upload-pack` (and so affects only fetches, not pushes).
2559+
An attempt to fetch a hidden ref by `git fetch` will fail. See
2560+
also `uploadpack.allowTipSHA1InWant`.
25632561

25642562
uploadpack.allowTipSHA1InWant::
25652563
When `uploadpack.hideRefs` is in effect, allow `upload-pack`

0 commit comments

Comments
 (0)