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

[PATCH] cg-object-id: comment the alternate id shortcut parsing

From
Jonas Fonseca <fonseca@diku.dk>
Date
Dec 7, 2005, 21:39 UTC
Message-ID
<20051207213943.GC25890@diku.dk>
Add comment about why Cogito's own 4 digit id shortcut parser is needed.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>

--- commit 3c14cded46e110396127fc5b5e65883eb5cd60b9 tree 593da711de14cfc3f8dc1fd5773990902568b42e parent 36c0d9fae209ab7fa889333e8eebef22e7f0f55c author Jonas Fonseca <fonseca@diku.dk> Wed, 07 Dec 2005 08:17:04 +0100 committer Jonas Fonseca <fonseca@antimatter.localdomain> Wed, 07 Dec 2005 08:17:04 +0100

 cg-object-id |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/cg-object-id b/cg-object-id
index 56d9f91..ea04dca 100755
--- a/cg-object-id
+++ b/cg-object-id
@@ -52,7 +52,9 @@ normalize_id()
 		id="$revid"
 		valid=1
 
-	# Short id's must be lower case and at least 4 digits.
+	# Short id's must be lower case and at least 4 digits. git-rev-parse(1)
+	# allows only down to 5 digits and we want to show the list of matched
+	# ids.
 	elif [[ "$id" == [0-9a-f][0-9a-f][0-9a-f][0-9a-f]* ]]; then
 		idpref=${id:0:2}
 		idpost=${id:2}
-- 
Jonas Fonseca
Next: Petr Baudis
Message 1 of 4 in “cg-object-id: comment the alternate id shortcut parsing”
  1. cg-object-id: comment the alternate id shortcut parsingJonas Fonseca, Dec 7, 2005
  2. Petr BaudisDec 7, 2005
  3. Jonas FonsecaDec 7, 2005
  4. Jonas FonsecaDec 7, 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.