git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: alan <alan@clueserver.org>, git@vger.kernel.org
Subject: Re: Problems with git am
Date: Tue, 27 Oct 2009 15:02:34 -0400	[thread overview]
Message-ID: <20091027190234.GA19454@sigill.intra.peff.net> (raw)
In-Reply-To: <7veiopbm9l.fsf@alter.siamese.dyndns.org>

On Mon, Oct 26, 2009 at 07:31:34PM -0700, Junio C Hamano wrote:

> alan <alan@clueserver.org> writes:
> 
> > The other question is what the proper behaviour when git-am in unable
> > to process a patch.  Under git 1.6.0, it exits with a non-zero error
> > code. Under the current git in the git repo it issues and error and
> > exits with a non-error exit code.
> 
> Hmph, that sounds like a recent regression to me.  I'll try to find time
> to look into it myself sometime tonight but no promises.

I'm having trouble reproducing, either with a totally bogus input format
or with "git log -p" output (which is what it sounds like the OP has).
Both of these tests already pass on 'next':

diff --git a/t/t4150-am.sh b/t/t4150-am.sh
index 8296605..2d5e32a 100755
--- a/t/t4150-am.sh
+++ b/t/t4150-am.sh
@@ -346,4 +346,17 @@ test_expect_success 'am -q is quiet' '
 	! test -s output.out
 '
 
+test_expect_success 'am properly reports error' '
+	echo excellent > bogus &&
+	test_must_fail git am bogus
+'
+
+test_expect_success 'am properly reports error (git log output)' '
+	echo more content >>file &&
+	git commit -m content file &&
+	git log -1 -p > bogus &&
+	git reset --hard HEAD^ &&
+	test_must_fail git am bogus
+'
+
 test_done

      reply	other threads:[~2009-10-27 19:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-27  0:12 Problems with git am Alan
2009-10-27  0:52 ` Junio C Hamano
2009-10-27  1:43   ` alan
2009-10-27  2:31     ` Junio C Hamano
2009-10-27 19:02       ` Jeff King [this message]

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=20091027190234.GA19454@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=alan@clueserver.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).