Re: Bogus error: Untracked working tree file '....' would be overwritten by merge. Aborting
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Nov 17, 2010, 09:33 UTC
- Message-ID
- <AANLkTinOFZ=qbCeeUmN7FcPFJT=SZqXEMsuof98ZW-Wh@mail.gmail.com>
- In-Reply-To
- <vpqtyjgxrqk.fsf@bauges.imag.fr>
On Wed, Nov 17, 2010 at 3:46 PM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> 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