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

[PATCH] Make '@' not valid in a ref name.

From
Shawn Pearce <spearce@spearce.org>
Date
May 21, 2006, 01:37 UTC
Message-ID
<20060521013751.GA7516@spearce.org>

Now that the sha1 expression syntax supports looking up a ref's value at a prior point in time through the '@' operator the '@' operator should not be permitted in a ref name.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
90d3212d5351d2f6c6ad33578c9f9df2e07af12e
 refs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
90d3212d5351d2f6c6ad33578c9f9df2e07af12e
diff --git a/refs.c b/refs.c
index eeb1196..2530c99 100644
--- a/refs.c
+++ b/refs.c
@@ -213,14 +213,14 @@ int get_ref_sha1(const char *ref, unsign
  *
  * - any path component of it begins with ".", or
  * - it has double dots "..", or
- * - it has ASCII control character, "~", "^", ":" or SP, anywhere, or
+ * - it has ASCII control character, "@", "~", "^", ":" or SP,
  * - it ends with a "/".
  */
 
 static inline int bad_ref_char(int ch)
 {
 	return (((unsigned) ch) <= ' ' ||
-		ch == '~' || ch == '^' || ch == ':' ||
+		ch == '@' || ch == '~' || ch == '^' || ch == ':' ||
 		/* 2.13 Pattern Matching Notation */
 		ch == '?' || ch == '*' || ch == '[');
 }
-- 
1.3.3.gfad60
Next: Junio C Hamano
Message 1 of 5 in “Make '@' not valid in a ref name.”
  1. Make '@' not valid in a ref name.Shawn Pearce, May 21, 2006
  2. Junio C HamanoMay 21, 2006
  3. Shawn PearceMay 21, 2006
  4. Eric WongMay 21, 2006
  5. Shawn PearceMay 21, 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.