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

[PATCH] upload-pack: no longer use hidden-refs as exclude_patterns

From
SGSURA via GitGitGadget <gitgitgadget@gmail.com>
Date
Feb 27, 2025, 12:46 UTC
Message-ID
<pull.1866.git.1740660371583.gitgitgadget@gmail.com>
From: SURA <sura907@hotmail.com>
Signed-off-by: SURA <sura907@hotmail.com>
---
    upload-pack: No longer use hidden-refs as exclude_patterns
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1866%2FSURA907%2Fmaster-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1866/SURA907/master-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1866
 upload-pack.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/upload-pack.c b/upload-pack.c
index 728b2477fcc..9ae42a463a3 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -609,21 +609,12 @@ static int allow_hidden_refs(enum allow_uor allow_uor)
 static void for_each_namespaced_ref_1(each_ref_fn fn,
 				      struct upload_pack_data *data)
 {
-	const char **excludes = NULL;
 	/*
-	 * If `data->allow_uor` allows fetching hidden refs, we need to
-	 * mark all references (including hidden ones), to check in
-	 * `is_our_ref()` below.
-	 *
-	 * Otherwise, we only care about whether each reference's object
-	 * has the OUR_REF bit set or not, so do not need to visit
-	 * hidden references.
+	 * config transfer.hideRefs of upload-pack is diffient from arg exclude of for-each-ref,
+	 * We should not set exclude_patterns here
 	 */
-	if (allow_hidden_refs(data->allow_uor))
-		excludes = hidden_refs_to_excludes(&data->hidden_refs);
-
 	refs_for_each_namespaced_ref(get_main_ref_store(the_repository),
-				     excludes, fn, data);
+				     NULL, fn, data);
 }
 
 

base-commit: 08bdfd453584e489d5a551aecbdcb77584e1b958
-- 
gitgitgadget
Next: Patrick Steinhardt
Message 1 of 3 in “upload-pack: no longer use hidden-refs as exclude_patterns”
  1. upload-pack: no longer use hidden-refs as exclude_patternsSURA via GitGitGadget, Feb 27, 2025
  2. Patrick SteinhardtFeb 27, 2025
  3. SURAFeb 27, 2025

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.