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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Petr Baudis <pasky@...>
Cc: <git@...>
Date: Tuesday, May 9, 2006 - 6:49 pm

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
 
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Fix cg-object-id to lookup parents in the Right Way, Yann Dirson, (Tue May 9, 6:49 pm)