From: Junio C Hamano Date: Tue, 22 Nov 2022 04:28:16 GMT Subject: Re: [Internet]Re: [PATCH v7 1/2] merge-tree.c: add --merge-base= option Message-ID: In-Reply-To: <3e5cdd224d76499bbddf55b0b649439b@tencent.com> "kylezhao(赵柯宇)" 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?