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

[PATCH] Fix cg-object-id to lookup parents in the Right Way

From
Yann Dirson <ydirson@altern.org>
Date
May 9, 2006, 22:49 UTC
Message-ID
<20060509224924.7400.93511.stgit@gandelf.nowhere.earth>

This causes grafts to not be ignored any more, allowing cg-admin-rewritehist to work as expected on grafted commits.

Signed-off-by: Yann Dirson <ydirson@altern.org>
---
 cg-object-id |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cg-object-id b/cg-object-id
index ee23082..71c72e5 100755
--- a/cg-object-id
+++ b/cg-object-id
@@ -147,7 +147,7 @@ fi
 
 
 if [ "$show_parent" ]; then
-	git-cat-file commit "$normid" | sed -ne 's/^parent //p;/^$/q'
+	git-rev-list --parents -n 1 "$normid"| tr ' ' '\n'|tail +2
 	exit 0
 fi
 
Message 1 of 1 in “Fix cg-object-id to lookup parents in the Right Way”
  1. Fix cg-object-id to lookup parents in the Right WayYann Dirson, May 9, 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.