From: Jeff King Date: Thu, 14 Jan 2016 10:21:35 GMT Subject: Re: What's cooking in git.git (Jan 2016, #02; Mon, 11) Message-ID: <20160114102134.GD30772@sigill.intra.peff.net> In-Reply-To: On Wed, Jan 13, 2016 at 03:54:05PM -0800, Junio C Hamano wrote: > And after doing the obvious wholesale replacement on callers that > hardcode either '\n' or '\0' with this: > > #!/bin/sh > perl -i -p -e ' > s/strbuf_getline\((.*?), '\''\\n'\''\)/strbuf_getline_lf($1)/g; > s/strbuf_getline\((.*?), '\''\\0'\''\)/strbuf_getline_nul($1)/g; > ' "$@" > > the only direct callers of strbuf_getline() that remain in the tree > are check-attr, check-ignore, checkout-index and mktree. > > And the conversion of mktree would look like this. I might further > tweak it to rename and flip the polarity of lf_lines to nul_lines, > but I do not think that matters very much. Heh. I read your series first, and independently came up with the same polarity-flipping thought. I agree it doesn't matter much, but maybe we can count that as two votes. :) -Peff