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

[PATCH v3 1/4] Document the semantics of hideRefs with namespaces

From
Lukas Fleischer <lfleischer@lfos.de>
Date
Nov 5, 2015, 06:07 UTC
Message-ID
<1446703651-9049-2-git-send-email-lfleischer@lfos.de>
In-Reply-To
<1446703651-9049-1-git-send-email-lfleischer@lfos.de>

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 <lfleischer@lfos.de>
---
 Documentation/config.txt | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 1204072..74a81e0 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -2684,6 +2684,14 @@ You may also include a `!` in front of the ref name to negate the entry,
 explicitly exposing it, even if an earlier entry marked it as hidden.
 If you have multiple hideRefs values, later entries override earlier ones
 (and entries in more-specific config files override less-specific ones).
++
+If a namespace is set, the namespace prefix is stripped from each reference
+before references are matched against hideRefs patterns. For example, if the
+prefix `refs/heads/master` is specified in `transfer.hideRefs` and the current
+namespace is `foo`, then `refs/namespaces/foo/refs/heads/master` is omitted
+from the advertisements but `refs/heads/master` and
+`refs/namespaces/bar/refs/heads/master` are still advertised as so-called
+"have" lines.
 
 transfer.unpackLimit::
 	When `fetch.unpackLimit` or `receive.unpackLimit` are
-- 
2.6.2
Previous: Lukas FleischerNext: Lukas Fleischer
Message 2 of 6 in “Improve hideRefs when used with namespaces”
  1. 0/4 Improve hideRefs when used with namespacesLukas Fleischer, Nov 5, 2015
  2. 1/4 Document the semantics of hideRefs with namespacesLukas Fleischer, Nov 5, 2015
  3. 2/4 upload-pack: strip refs before calling ref_is_hidden()Lukas Fleischer, Nov 5, 2015
  4. 3/4 Add support for matching full refs in hideRefsLukas Fleischer, Nov 5, 2015
  5. 4/4 t5509: add basic tests for hideRefsLukas Fleischer, Nov 5, 2015
  6. Junio C HamanoNov 5, 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.