Re: [PATCH] Allow git-diff exit with codes similar to diff(1)
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Mar 14, 2007, 01:03 UTC
- Message-ID
- <Pine.LNX.4.63.0703140201240.22628@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <81b0412b0703131717k7106ee1cg964628f0bda2c83e@mail.gmail.com>
Hi,
On Wed, 14 Mar 2007, Alex Riesen wrote:
> This introduces a new command-line option: --exit-code. The diff > programs will return 1 for differences, return 0 for equality, and > something else for errors.
I am not convinced that this exit code (even if expected by experience) makes sense. A diff should _only_ fail if anything goes _wrong_, not if the files are _different. That is what cmp is for, no?
Ciao, Dscho