git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] docs/config.txt: reorder hideRefs config

From
Jeff King <peff@peff.net>
Date
Jul 28, 2015, 19:59 UTC
Message-ID
<20150728195911.GA13795@peff.net>
In-Reply-To
<20150728195747.GA13596@peff.net>

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 <peff@peff.net>
---
I think this makes sense, though I could also see an argument that the
reader would rather hit the individual program's hideRefs config first
and not get redirected. The second patch relies on this textually, but
if we want to drop this one, I can rebase the second to just add the new
text in both places.
 Documentation/config.txt | 32 +++++++++++++++-----------------
 1 file changed, 15 insertions(+), 17 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 43bb53c..448eb9d 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -2242,13 +2242,10 @@ receive.denyNonFastForwards::
 	set when initializing a shared repository.
 
 receive.hideRefs::
-	String(s) `receive-pack` uses to decide which refs to omit
-	from its initial advertisement.  Use more than one
-	definitions to specify multiple prefix strings. A ref that
-	are under the hierarchies listed on the value of this
-	variable is excluded, and is hidden when responding to `git
-	push`, and an attempt to update or delete a hidden ref by
-	`git push` is rejected.
+	This variable is the same as `transfer.hideRefs`, but applies
+	only to `receive-pack` (and so affects pushes, but not fetches).
+	An attempt to update or delete a hidden ref by `git push` is
+	rejected.
 
 receive.updateServerInfo::
 	If set to true, git-receive-pack will run git-update-server-info
@@ -2536,9 +2533,13 @@ transfer.fsckObjects::
 	Defaults to false.
 
 transfer.hideRefs::
-	This variable can be used to set both `receive.hideRefs`
-	and `uploadpack.hideRefs` at the same time to the same
-	values.  See entries for these other variables.
+	String(s) `receive-pack` and `upload-pack` use to decide which
+	refs to omit from their initial advertisements.  Use more than
+	one definition to specify multiple prefix strings. A ref that is
+	under the hierarchies listed in the value of this variable is
+	excluded, and is hidden when responding to `git push` or `git
+	fetch`.  See `receive.hideRefs` and `uploadpack.hideRefs` for
+	program-specific versions of this config.
 
 transfer.unpackLimit::
 	When `fetch.unpackLimit` or `receive.unpackLimit` are
@@ -2553,13 +2554,10 @@ uploadarchive.allowUnreachable::
 	`false`.
 
 uploadpack.hideRefs::
-	String(s) `upload-pack` uses to decide which refs to omit
-	from its initial advertisement.  Use more than one
-	definitions to specify multiple prefix strings. A ref that
-	are under the hierarchies listed on the value of this
-	variable is excluded, and is hidden from `git ls-remote`,
-	`git fetch`, etc.  An attempt to fetch a hidden ref by `git
-	fetch` will fail.  See also `uploadpack.allowTipSHA1InWant`.
+	This variable is the same as `transfer.hideRefs`, but applies
+	only to `upload-pack` (and so affects only fetches, not pushes).
+	An attempt to fetch a hidden ref by `git fetch` will fail.  See
+	also `uploadpack.allowTipSHA1InWant`.
 
 uploadpack.allowTipSHA1InWant::
 	When `uploadpack.hideRefs` is in effect, allow `upload-pack`
-- 
2.5.0.rc3.557.g17a1555
Previous: Jeff KingNext: Jeff King
Message 2 of 7 in “negative hideRefs for overriding”
  1. 0/2 negative hideRefs for overridingJeff King, Jul 28, 2015
  2. 1/2 docs/config.txt: reorder hideRefs configJeff King, Jul 28, 2015
  3. 2/2 refs: support negative transfer.hideRefsJeff King, Jul 28, 2015
  4. Junio C HamanoJul 28, 2015
  5. Jeff KingJul 28, 2015
  6. Eric SunshineJul 30, 2015
  7. Jeff KingJul 30, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.