Re: [PATCH] merge: allow to pretend a merge into detached HEAD is made into a branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/18/2021 5:27 AM, Ævar Arnfjörð Bjarmason wrote:
> 
> On Fri, Dec 17 2021, Junio C Hamano wrote:
> 
>> +		OPT_STRING(0, "detached", &detached_head_name, N_("name"),
>> +			   N_("use <name> instead of detached HEAD")),
>> [...]
>> +	OPT_STRING(0, "detached", &detached_head_name, N_("name"),
>> +		   N_("use <name> instead of detached HEAD")),
> 
> Maybe OPT_STRING_F and PARSE_OPT_NONEG, or does --no-detached make
> sense?

While sometimes undocumented, these "--no-" options allows calling an
alias that might have the positive version included while disabling the
option.

	git alias merge-main merge <lots-of-custom-things> --detached-head-name=main
	git merge-main --no-detached-head-name

So, I think using the standard OPT_STRING here is fine.

Thanks,
-Stolee



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux