Re: [PATCH] am: terminate state files with a newline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 23, 2015 at 11:48:44PM -0700, Junio C Hamano wrote:

> > 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]