From: Junio C Hamano Date: Wed, 14 Mar 2007 16:37:13 GMT Subject: Re: [PATCH] Allow git-diff exit with codes similar to diff(1) Message-ID: <7vwt1jaiiu.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <81b0412b0703140933v5c684aa9g1f61d61e502c6783@mail.gmail.com> "Alex Riesen" writes: >> echo ... && >> git add . && >> { >> git diff-index ...; test $? != 0 >> } > > Confused. What's wrong with test_expect_failure which > does not need any of the both ugly constructions? > Hmm... Do you mean: "we expect successful > operation with exit code 1"? No. Think what happens if you broke "git add".