git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: git@vger.kernel.org
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Subject: [PATCH v2] git-am: indicate where a failed patch is to be found.
Date: Fri, 13 Jul 2012 11:51:30 -0400	[thread overview]
Message-ID: <1342194690-31578-1-git-send-email-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <7vobnkadsw.fsf@alter.siamese.dyndns.org>

If git am fails to apply something, the end user may need
to know where to find the patch.  This is normally known for
a single patch, but if the user is processing a mbox with
many patches, they may not have a single broken out patch
handy.  So, provide a helpful hint as to where they can
find the patch to do some sort of manual fixup, if we
are processing a mbox with more than one patch in it.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
[v2: drop text suggesting what to do with failed patch; only
 emit the help text if we are processing mbox with multi patches]

 git-am.sh |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/git-am.sh b/git-am.sh
index f8b7a0c..20b3b73 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -855,6 +855,11 @@ did you forget to use 'git add'?"
 	if test $apply_status != 0
 	then
 		eval_gettextln 'Patch failed at $msgnum $FIRSTLINE'
+		if test $patch_format = mbox && test "$last" -ne "1"
+		then
+			eval_gettextln "You can find the copy of the patch that failed here:
+   $dotest/patch"
+		fi
 		stop_here_user_resolve $this
 	fi
 
-- 
1.7.9.7

  reply	other threads:[~2012-07-13 15:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12 15:50 [PATCH] git-am: indicate where a failed patch is to be found Paul Gortmaker
2012-07-12 17:45 ` Junio C Hamano
2012-07-12 18:32   ` Paul Gortmaker
2012-07-12 18:53     ` Junio C Hamano
2012-07-12 19:36       ` Paul Gortmaker
2012-07-12 20:00         ` Junio C Hamano
2012-07-13 17:40           ` Paul Gortmaker
2012-07-13 18:06             ` Junio C Hamano
2012-07-12 21:07         ` Junio C Hamano
2012-07-13 15:51           ` Paul Gortmaker [this message]
2012-07-13 19:58             ` [PATCH v2] " Junio C Hamano
2012-07-13 22:46               ` Paul Gortmaker
2012-07-13 23:02                 ` Junio C Hamano
2012-07-12 21:18       ` [PATCH] " Nicolas Sebrecht
2012-07-12 21:55         ` Junio C Hamano
2012-07-12 20:33     ` [PATCH] " Jeff King

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=1342194690-31578-1-git-send-email-paul.gortmaker@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=git@vger.kernel.org \
    /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).