Re: [PATCH 2/3] format_config: simplify buffer handling
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 21, 2015, 17:43 UTC
- Message-ID
- <xmqqr3mw5yg1.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <xmqqvbc85yi3.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 8 quoted lines
> I wonder if we can do this instead
>
> if (!omit_values) {
> - if (show_keys)
> + if (show_keys && value_)
> strbuf_addch(buf, key_delim);
>
> though. That would eliminate the need for rolling back.No we cannot. "config --bool --get-regexp" could get a NULL value_ and has to turn it to " true".
Sorry for the noise.