From: Nguyen Thai Ngoc Duy Date: Wed, 17 Nov 2010 09:33:56 GMT Subject: Re: Bogus error: Untracked working tree file '....' would be overwritten by merge. Aborting Message-ID: In-Reply-To: On Wed, Nov 17, 2010 at 3:46 PM, Matthieu Moy wrote: >> Even better, do a file size check here. If it's not equal, there's no >> point in calling the expensive index_path(). > > I think you also need to check mode changes here. Hmm.. ce_compare_data() does the same thing as identical_content() and will be called by ie_match_stat() in racy condition. I think we should add another flag to ie_match_stat() and let it call ce_compare_data(), instead of creating a new function identical_content(). ie_match_stat() does check mode changes and other stuff so if it returns 0 (with ce_compare_data() called), it's safe. -- Duy