git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sverre Rabbelier <srabbelier@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Jonas Flodén" <jonas@floden.nu>,
	"Junio C Hamano" <gitster@pobox.com>, "Eric Herman" <eric@f>
Cc: Sverre Rabbelier <srabbelier@gmail.com>
Subject: [PATCH] Add abbreviated commit hash to rebase conflict message
Date: Sat,  5 Nov 2011 15:02:39 +0100	[thread overview]
Message-ID: <1320501759-27236-1-git-send-email-srabbelier@gmail.com> (raw)

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

             reply	other threads:[~2011-11-05 14:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-05 14:02 Sverre Rabbelier [this message]
2011-11-06  0:31 ` [PATCH] Add abbreviated commit hash to rebase conflict message 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1320501759-27236-1-git-send-email-srabbelier@gmail.com \
    --to=srabbelier@gmail.com \
    --cc=avarab@gmail.com \
    --cc=eric@f \
    --cc=gitster@pobox.com \
    --cc=jonas@floden.nu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).