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

[PATCH] git-fetch-pack: really do not ask for funny refs

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 18, 2006, 23:24 UTC
Message-ID
<Pine.LNX.4.63.0601190023390.15298@wbgn013.biozentrum.uni-wuerzburg.de>

If git-fetch-pack was called with out any refspec, it would ask the server for funny refs. That cannot work, since the funny refs are not marked as OUR_REF by upload-pack, which just exits with an error.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 fetch-pack.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
718ad2d76a6c7d350d63c0660aeb69518b765310
diff --git a/fetch-pack.c b/fetch-pack.c
index d34f322..27f5d2a 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -262,9 +262,6 @@ static void filter_refs(struct ref **ref
 {
 	struct ref *prev, *current, *next;
 
-	if (!nr_match)
-		return;
-
 	for (prev = NULL, current = *refs; current; current = next) {
 		next = current->next;
 		if ((!memcmp(current->name, "refs/", 5) &&
-- 
1.1.3.g0bf8-dirty
Next: Junio C Hamano
Message 1 of 2 in “git-fetch-pack: really do not ask for funny refs”
  1. git-fetch-pack: really do not ask for funny refsJohannes Schindelin, Jan 18, 2006
  2. Junio C HamanoJan 19, 2006

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.