Re: [PATCH v3 09/10] builtin/diff-tree: learn --merge-base
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 21, 2020, 21:19 UTC
- Message-ID
- <xmqqo8lyesk2.fsf@gitster.c.googlers.com>
- In-Reply-To
- <xmqqwo0met17.fsf@gitster.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 9 quoted lines
> Another possibility is to error out when "--merge-base A..B" is > given, which might be simpler. Then the code would look more like > ... > > While we are at it, what happens when "--merge-base A...B" is given? > > ... Is this something we want to diagnose as an error? I am > inclined to say we should allow it (and if it hurts the user can > stop doing so) as there is no harm done.
My recommendation is to allow both "git --merge-base A..B" and "git --merge-base A...B". The discussion about A..B and SWAP() would equally apply to builtin/diff part of the patch. The posted patch ignores the swap logic when --merge-base is given, but we should apply the swap logic first and then make sure the merge_base logic will have the oid[0] and oid[1] in the correct order.