Re: [PATCH 01/15] t6120-describe: correct test repo history graph in comment
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Sep 20, 2019, 22:29 UTC
- Message-ID
- <20190920222920.GE26402@szeder.dev>
- In-Reply-To
- <xmqqv9tmskqt.fsf@gitster-ct.c.googlers.com>
On Fri, Sep 20, 2019 at 02:47:38PM -0700, Junio C Hamano wrote:
Show 20 quoted lines
> SZEDER Gábor <szeder.dev@gmail.com> writes: > > > At the top of 't6120-describe.sh' an ASCII graph illustrates the > > repository's history used in this test script. This graph is a bit > > misleading, because it swapped the second merge commit's first and > > second parents. > > Hmm... > > > +# ,---o----o----o-----. > > +# / D,R e \ > > +# o--o-----o-------------o---o----x > > +# \ B / > > +# `---o----o----o-' > > +# A c > > What's the first parent of the merge between 'B' and 'c' in this > picture and how does the reader figure it out? What about the same > question on the direct parent of 'x'? Is it generally accepted that > a straight line denotes the first ancestry, or something?
I've always thought that the parents are numbered from top to bottom, i.e. 'B' is the first parent of the first merge, and the unnamed commit at the top is the first parent of the second merge.
Would it help if it were arranged like this:
o---o-----o----o----o-------o----x
\ D,R e /
\---o-------------o-'
\ B /
`-o----o----o-'
A cThis is basically how 'git log --graph' would show them, except that this is horizontal.