[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: info diff - diff exitcodes (and perhaps wrong exitcodes in diff)
From: |
Paul Eggert |
Subject: |
Re: info diff - diff exitcodes (and perhaps wrong exitcodes in diff) |
Date: |
Thu, 08 Apr 2004 19:11:06 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Christian Boltz <address@hidden> writes:
> improvement suggestion for 'info diff':
> ===
> Exit status
> - 0 means no differences were found
> - 1 means some differences were found and (if not using -q) a patch
> could be created
> - 2 means trouble. Reasons for this can be:
> - differences in binary files and -q was *not* given
> - one of the given files does not exist or is not readable
Thanks for the suggestion. I'd like to use the following text
instead, as I think it's a bit clearer.
An exit status of 0 means no differences were found, 1 means some
differences were found, and 2 means trouble. Normally, differing
binary files count as trouble, but this can be altered by using the
@option{--a} or @option{--text} option, or the @option{-q} or
@option{--brief} option.
> perhaps there's a wrong exitcode in diff. When calling
> diff -r dir1/ dir2/ # *without* -N
> I get a message
> Only in dir1/: file1
> with $? = 1, but the resulting patch is not complete (file1 is missing
> in it). Shouldn't the exitcode also be 2 in this case?
I think not, as POSIX specifies that output report format in
<http://www.opengroup.org/onlinepubs/007904975/utilities/diff.html>
so it's not trouble when it occurs.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: info diff - diff exitcodes (and perhaps wrong exitcodes in diff),
Paul Eggert <=