Re: git commit file completion recently broke
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 7, 2017, 15:24 UTC
- Message-ID
- <xmqq8teeftn7.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CAP8UFD3iL_sRgvhm7YO_jVG5RiNn1=JRW0qvhBEPcUtCorWdYA@mail.gmail.com>
Christian Couder <christian.couder@gmail.com> writes:
Show 11 quoted lines
>> I do think it may make sense for >> the "short" one to use NULL, like: >> >> skip_to_optional_val(arg, "--relative, &arg) >> >> but maybe some other callers would be more inconvenienced (they may have >> to current NULL back into the empty string if they want to string >> "--foo" the same as "--foo="). > > I discussed that with Junio and yeah there are many callers that want > "--foo" to be the same as "--foo=".
Yup, the original thread has details and me saying that assuming all of them want --foo and --foo= the same is questionable. The likely fix would be to use the _default variant with NULL, which was added exactly for cases like this.