Re: Problems with git am
- From
Jeff King <peff@peff.net>
- Date
- Oct 27, 2009, 19:02 UTC
- Message-ID
- <20091027190234.GA19454@sigill.intra.peff.net>
- In-Reply-To
- <7veiopbm9l.fsf@alter.siamese.dyndns.org>
On Mon, Oct 26, 2009 at 07:31:34PM -0700, Junio C Hamano wrote:
Show 9 quoted lines
> 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