git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [BUG] Documentation: git log: --exit-code undocumented?

From
Sergey Organov <sorganov@gmail.com>
Date
Dec 2, 2014, 11:30 UTC
Message-ID
<87ppc2xp9k.fsf@osv.gnss.ru>
In-Reply-To
<xmqqwq6bp8ey.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 18 quoted lines
> David Kastrup <dak@gnu.org> writes:
>
>> 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.
>
> Hmph.
>
>     $ git log --exit-code master..maint >/dev/null; echo $?
>     0
>     $ git log --exit-code maint..master >/dev/null; echo $?
>     1
>
> That is a strange way to use --exit-code.
What's the best way then to tell if "a" is an ancestor of "b"?
-- 
Sergey.
Previous: David KastrupNext: John Keeping
Message 9 of 10 in “[BUG] Documentation: git log: --exit-code undocumented?”
  1. Sergey OrganovDec 1, 2014
  2. Junio C HamanoDec 1, 2014
  3. Sergey OrganovDec 1, 2014
  4. Junio C HamanoDec 1, 2014
  5. Sergey OrganovDec 1, 2014
  6. David KastrupDec 1, 2014
  7. Junio C HamanoDec 1, 2014
  8. David KastrupDec 1, 2014
  9. Sergey OrganovDec 2, 2014
  10. John KeepingDec 2, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.