threads / patch / 4114

patchFix cg-object-id to lookup parents in the Right Way

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

## tl;dr

One message between May 9, 2006 and May 9, 2006. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Yann Dirson· May 9, 2006, 22:49 UTC · lore

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(-)
Show changes to cg-object-id +1 −1
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
 

← back to recent threads