Re: [PATCH] Allow git-diff exit with codes similar to diff(1)
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Mar 14, 2007, 01:20 UTC
- Message-ID
- <Pine.LNX.4.64.0703131816360.9690@woody.linux-foundation.org>
- In-Reply-To
- <Pine.LNX.4.63.0703140201240.22628@wbgn013.biozentrum.uni-wuerzburg.de>
On Wed, 14 Mar 2007, Johannes Schindelin wrote:
> > 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?
Well, "cmp" doesn't do a sane job for recursive diffs.
And Alex is certainly correct in stating that people historically expect and use the exit status of a regular "diff". I don't think there is any real down-side to making "git diff" have the same semantics, especially since the current exit-status isn't exactly useful.
Linus