Re: [PATCH] am: terminate state files with a newline
- From
Jeff King <peff@peff.net>
- Date
- Aug 24, 2015, 06:50 UTC
- Message-ID
- <20150824065033.GA4124@sigill.intra.peff.net>
- In-Reply-To
- <xmqqegit5ghf.fsf@gitster.dls.corp.google.com>
On Sun, Aug 23, 2015 at 11:48:44PM -0700, Junio C Hamano wrote:
Show 14 quoted lines
> > I think the "if" here is redundant; strbuf_complete_line already handles > > it. > > True. And I like your write_state_bool() wrapper (which should be > "static void" to the builtin/am.c) very much. > > On top of that, I think the right thing to do to write_file() would > be to first clean-up the second parameter "fatal" to an "unsigned > flags" whose (1<<0) bit is "fatal", (1<<1) bit is "binary", and make > this new call to "strbuf_complete_line()" only when "binary" bit is > not set. > > The new comment I added before write_file() function needs to be > adjusted if we were to do this, obviously.
Yup, I agree with all of that. I'm about to go to bed, so I'll assume you or Paul will cook up a patch. :)
-Peff