git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add abbreviated commit hash to rebase conflict message
@ 2011-11-05 14:02 Sverre Rabbelier
  2011-11-06  0:31 ` Junio C Hamano
  0 siblings, 1 reply; 9+ messages in thread
From: Sverre Rabbelier @ 2011-11-05 14:02 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason, Jonas Flodén,
	Junio C Hamano, Eric Herman
  Cc: Sverre Rabbelier

Also move the $msgnum to a more sensible location.

Before:
	Patch failed at 0001 msg
After:
	Patch 0001 failed at [da65151] msg

Reviewed-by: Eric Herman <eric@freesa.org>
Reviewed-by: Fernando Vezzosi <buccia@repnz.net>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
---
 git-am.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/git-am.sh b/git-am.sh
index 9042432..9d70588 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -837,7 +837,8 @@ did you forget to use 'git add'?"
 	fi
 	if test $apply_status != 0
 	then
-		eval_gettextln 'Patch failed at $msgnum $FIRSTLINE'
+		abbrev_commit=$(git log -1 --pretty=%h $commit)
+		eval_gettextln 'Patch $msgnum failed at [$abbrev_commit] $FIRSTLINE'
 		stop_here_user_resolve $this
 	fi
 
-- 
1.7.8.rc0.36.g67522.dirty

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-11-09 18:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-05 14:02 [PATCH] Add abbreviated commit hash to rebase conflict message Sverre Rabbelier
2011-11-06  0:31 ` Junio C Hamano
2011-11-06  0:37   ` Sverre Rabbelier
2011-11-06  4:14     ` Junio C Hamano
2011-11-06 19:35       ` Sverre Rabbelier
2011-11-06 20:27         ` Junio C Hamano
2011-11-06 20:42           ` Sverre Rabbelier
2011-11-07  0:12             ` Junio C Hamano
2011-11-09 18:25               ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).