Skip to contentSkip to conversation

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

PATCH New Yann Dirson 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix cg-object-id to lookup parents in the Right Way

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

---

 cg-object-id |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
cg-object-id +1 -1
index ee23082..71c72e5 100755
@@ -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