public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: "SURA via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: SURA <sura907@hotmail.com>, SURA <sura907@hotmail.com>
Subject: [PATCH] upload-pack: no longer use hidden-refs as exclude_patterns
Date: Thu, 27 Feb 2025 12:46:11 +0000	[thread overview]
Message-ID: <pull.1866.git.1740660371583.gitgitgadget@gmail.com> (raw)

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

             reply	other threads:[~2025-02-27 12:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-27 12:46 SURA via GitGitGadget [this message]
2025-02-27 14:54 ` [PATCH] upload-pack: no longer use hidden-refs as exclude_patterns Patrick Steinhardt
2025-02-27 15:51   ` SURA

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.1866.git.1740660371583.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sura907@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox