Re: [Internet]Re: [PATCH v7 1/2] merge-tree.c: add --merge-base=<commit> option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 22, 2022, 04:28 UTC
- Message-ID
- <xmqqcz9fsjdr.fsf@gitster.g>
- In-Reply-To
- <3e5cdd224d76499bbddf55b0b649439b@tencent.com>
"kylezhao(赵柯宇)" <kylezhao@tencent.com> writes:
> I went to check the api-parse-option.txt, but I didn't found an > elegant solution to stop when the users uses the second > "--merge-base".
That's not even a fix, as it does not allow specifying more than one merge bases, is it?
Just like how builtin/merge-tree.c::real_merge() is prepared to handle parent1 and parent2 that have multiple merge bases and pass all of them to the underlying merge machinery, you can accumulate multiple strings using OPT_STRING_LIST() and use all of them as merge_bases, no?