Re: Problems with git am

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

> alan <alan@xxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]