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

Re: [PATCH] Document git rev-list --first-parent

From
AKAvi Kivity <avi@qumranet.com>
Date
Dec 24, 2007, 09:40 UTC
Message-ID
<476F7EA4.1030001@qumranet.com>
In-Reply-To
<7vprwwsbey.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
Show 29 quoted lines
> Avi Kivity <avi@qumranet.com> writes:
>
>   
>> Junio C Hamano wrote:
>>     
>>> Avi Kivity <avi@qumranet.com> writes:
>>>
>>>       
>>>> Document git rev-list's --first-parent option.  Documentation taken from
>>>> git log.
>>>> ...
>>>> +--first-parent::
>>>> +	Follow only the first parent commit upon seeing a merge
>>>> +	commit.  This  option gives a better overview of the
>>>> +	evolution of a particular branch.
>>>> +
>>>>
>>>>         
>>> I am afraid that this description is not sufficient.  The
>>> history given by --first-parent is useful only in a very limited
>>> use case, and the user needs to be aware of it.
>>>       
>> I don't know which use case you are referring to...
>>     
>
> Please read the commit log message you snarfed the description
> again.
>
>   
[I assume you mean 0053e902;  I just copied the output of git log --help]
Show 8 quoted lines
> First-parent is useful only if you are the primary integrator
> and do not fast-forward from other people.  Only in that case,
> you will see the overview of "the primary integration branch".
> Otherwise you will observe the history viewed by whoever
> happened to make a merge, which would switch every time you
> cross the fast-forward boundary.
>
>   

Well, my use case is different. All of the development merges are fast-forwards (or plain patch applications); the only multiple-parent merges are pulls I do from the main tree in order to advance the baseline, or from upstream submission branches (which are very similar). So, for me --first-parent means "show me actual development, not syncs with upstream or cleanup branches".

> Making it sound as if it always will give a better overview is
> misleading.
>   
I'll try to come up with better wording and submit a new patch.
-- 
error compiling committee.c: too many arguments to function
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 9 in “Document git rev-list --first-parent”
  1. Document git rev-list --first-parentAvi Kivity, Dec 24, 2007
  2. Junio C HamanoDec 24, 2007
  3. Avi KivityDec 24, 2007
  4. Junio C HamanoDec 24, 2007
  5. Avi KivityDec 24, 2007
  6. Junio C HamanoDec 24, 2007
  7. Avi KivityDec 24, 2007
  8. Avi KivityDec 24, 2007
  9. Junio C HamanoDec 25, 2007

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.