On Fri, 6 Nov 2015 08:26:25 -0800 (PST)
Wink Saville <w...@saville.com> wrote:

> git config alias.sdiff '!'"git diff && git submodule foreach 'git
> diff'"
> Thus, the alias.sdiff makes sense, but is there documentation on the
> return values?

I don't think these return values are documented but it's just the
ages-old standard POSIX convention that the exit code 0 of a program
indicates success while any code in range 1..127 indicates failure
(a code > 127 usually means that the program has been killed by
an OS signal it failed to catch and process -- such as SIGFAULT or
SIGILL -- see man signal(7)).

Hence it's customary to just distinguish between the zero and non-zero
exit codes, and the && and || POSIX shell operators do just that:
&& does only execute the following command if the preceding one exited
OK (returned 0) and || does only execute the following command if the
preceding one exited signalizing a failure (non-zero).  For more info
see the sections "AND lists" and "OR lists" in [1].

Please fix your terminology. ;-)  "bash true" is a bit of a nonsense as
exit codes are not specific to shells -- they are a property of the
process execution model implemented by an OS (and mandated by the POSIX
standard).  And surely any POSIX-compatible (in fact, any Unix-y) shell
treats 0 and non-0 in the same way.

1. http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to