Re: [PATCH v2 3/6] clean: read user input with strbuf_getline()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 22, 2016, 19:40 UTC
- Message-ID
- <xmqqtwl05y9m.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CAPig+cSi-4R-a=HVmpCWAZ3kr=yQtJ9GdT-JZ4hJ2kmqg-edVA@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 18 quoted lines
> On Sun, Feb 21, 2016 at 8:20 PM, Moritz Neeb <lists@moritzneeb.de> wrote: >> The inputs that are read are all answers that are given by the user >> when interacting with git on the commandline. As these answers are >> not supposed to contain a meaningful CR it is safe to >> replace strbuf_getline_lf() can be replaced by strbuf_getline(). >> >> Before the user input was trimmed to remove the CR. This would be now >> redundant. Another effect of the trimming was that some (accidentally) >> typed spaces were filtered. But here we want to be consistent with similar UIs >> like interactive adding, which only accepts space-less input. > > I don't at all insist upon it, but this behavior change feels somewhat > like it ought to be in its own commit. I'm also not convinced that > making this consistent with the less forgiving behavior of > "interactive adding" is desirable (rather the reverse: that that case > should be more flexible). However, I wasn't following the discussion > with Junio closely, and perhaps missed you two agreeing that this is > preferable.
There was no such discussion ;-)
I am not 100% sure if we want to be lenient in reading "yes, please remove this one", but if we already are loose, I tend to agree that there is not much point tightening it, especially with a clean-up topic like this one.
Thanks.