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

[PATCH] sha1_name: do not accept .git/refs/snap/.

From
Junio C Hamano <junkio@cox.net>
Date
Aug 21, 2005, 09:43 UTC
Message-ID
<7vr7cniq1f.fsf@assigned-by-dhcp.cox.net>

I think Linus did a cut & paste from an early JIT code while developing the current extended SHA1 notation, and left it there as a courtesy, but the directory does not deserve to be treated any more specially than, say, .git/refs/bisect.

If the subdirectories under .git/refs proliferate, we may want to switch to scanning that hierarchy at runtime, instead of the current hard-coded set, although I think that would be overkill.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 sha1_name.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
19b3a5f94a98d523272c5c19fc166e879ce517e0
diff --git a/sha1_name.c b/sha1_name.c
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -143,7 +143,6 @@ static int get_sha1_basic(const char *st
 		"refs",
 		"refs/tags",
 		"refs/heads",
-		"refs/snap",
 		NULL
 	};
 	const char **p;
Message 1 of 1 in “sha1_name: do not accept .git/refs/snap/.”
  1. sha1_name: do not accept .git/refs/snap/.Junio C Hamano, Aug 21, 2005

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.