The git-log
man page describes the --check
option as incompatible with the --exit-code
option. I'd like to know what this --exit-code
means but I can't find it anywhere. I've tried man git log
, man git
, Google and direct search here on SO... to no avail!
What does --exit-code
mean for git log
?
TL; DR
--exit-code
is adiff-*
1 option that makes the Git command exit with1
if there are changes, and0
otherwise.You can read about it in the
git-diff
man page (it's only mentioned in passing in thegit-log
man page).More details
Both
--check
and--exit-code
are described in thegit-diff
man page (more specifically, inDocumentation/diff-options.txt
):and
Some, though not all,
diff-*
options are compatible withgit-log
. The--check
option is, whereas the--exit-code
option is not, as hinted at by the following commit message from the Git-project repository:(1)
diff-*
stands for the plumbing commands that porcelaingit-diff
is based on.It's mentioned in the git-diff docs (and is apparently not intended to be used with
git-log
):