Re: [PATCH v2 4/6] notes: read copied notes with strbuf_getline()
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 9 quoted lines
> A deeper issue not touched upon by the commit message (but which
> should be) is that that strbuf_split() leaves the "terminator" (space,
> in this case) on the component strings, and that is why split[0] must
> be rtrim'd. Rather than dropping only one of the rtrim's, a cleaner
> approach might be to convert the code to use string_list_split() which
> doesn't have the "odd" behavior of leaving the terminator on the split
> strings, in which case both rtrim's could be retired.
> This, of course,
> would be done as a separate preparatory patch.
Yeah, this is a good point to raise.
Thanks.