From: Jeff King Date: Thu, 13 Nov 2014 21:37:19 GMT Subject: Re: [RFC] git checkout $tree -- $path always rewrites files Message-ID: <20141113213719.GC7563@peff.net> In-Reply-To: On Thu, Nov 13, 2014 at 01:18:43PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > On Thu, Nov 13, 2014 at 02:26:55PM -0500, Jeff King wrote: > > > >> > Makes sense, including the use of strbuf (otherwise you would > >> > allocate ce and then discard when it turns out that it is not > >> > needed, which is probably with the same allocation pressure, but > >> > looks uglier). > >> > >> Exactly. Constructing it in ce->name does save you an allocation/memcpy > >> in the case that we actually use the new entry, but I thought it would > >> look weirder. It probably doesn't matter much either way, so I tried to > >> write the most obvious thing. > > > > Actually, it is not that bad: > > Yeah, actually it does look better; want me to squash it into the > patch before queuing? Yeah, if you like it, too, then let's go with it. Thanks. -Peff