Re: [BUG] Documentation: git log: --exit-code undocumented?
- From
David Kastrup <dak@gnu.org>
- Date
- Dec 1, 2014, 17:32 UTC
- Message-ID
- <874mtfl1hx.fsf@fencepost.gnu.org>
- In-Reply-To
- <xmqqegsjqqox.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 11 quoted lines
> Sergey Organov <sorganov@gmail.com> writes: > >> Hello, >> >> $ git help log | grep exit-code >> problems are found. Not compatible with --exit-code. >> $ >> >> What --exit-code does in "git log"? > > It doesn't. That is why it is not listed.
I disagree that --exit-code does nothing: it indicates whether the listed log is empty. So for example
git log -1 --exit-code a..b > /dev/null
can be used to figure out whether "a" is a proper ancestor of "b" or not.
-- David Kastrup