From: Junio C Hamano Date: Mon, 14 Jan 2008 21:54:11 GMT Subject: Re: [PATCH] builtin-commit.c: remove useless check added by faulty cut and paste Message-ID: <7vsl10hy4c.fsf@gitster.siamese.dyndns.org> In-Reply-To: <200801142128.m0ELSBoE030025@mi0.bluebottle.com> しらいしななこ writes: > You are calling overlay_tree_on_cache() which does use CE_UPDATE flag to mark > duplicate entries. And that is the same algorithm as used when git-ls-files > is called with its --with-tree option. I think this if statement is not > mindless but is the right thing to have the same logic as you have in > git-ls-files. You are right and I was stupid. Because the pathname ce->name is given to path_list_insert() which does not allow duplicates, there is no breakage either way from the correctness point of view in this codepath, unlike the one in ls-files. But avoiding unnecessary processing with a single bit check is certainly better. Will revert, but I first have to go find a brown paper bag.