Re: [RFC PATCH v5] Implement --first-parent for git rev-list --bisect
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 6, 2018, 21:43 UTC
- Message-ID
- <xmqqfu0whwgo.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <nycvar.QRO.7.76.6.1807062123280.75@tvgsbejvaqbjf.bet>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 9 quoted lines
>> And I also do not see a reason why somebody wants to make the dist >> computation to be 1-based (iow, changing the minimum from 0 to 1) or >> one step not to be 1 (iow, giving 11 to e1 and e8), so while I agree >> it is not strictly necessary to cast the concrete distance value in >> stone, I do not see much harm doing so *if* it helps to make it >> simpler the test that is necessary to make sure relative dist values >> assigned to these commits are in correct order. > > I guess that you still want to misunderstand me.
Not at all.
> So in this case, quite obviously what you want to do is to verify that E > and F get larger dist than e1 and e8. So that is what you test for. Not > some fixed text that might require adjusting in the future for any other > reason than a real bug.
The most important part of the above quote is "*if* it helps..." part, and I do think the downside of insisting on dist being exactly 0 for E and F is acceptable than having to write the "E and F must get the same dist value, and e1 and e8 must get the same dist value that is larger than the value that E and F gets, ..." test without doing so *and* still keep the resulting test readable. It is a tradeoff and we are drawing the line differently (I am being more practical here than insisting on requiring absolute minimum and nothing more).