From: Matthieu Moy Date: Wed, 17 Nov 2010 08:46:11 GMT Subject: Re: Bogus error: Untracked working tree file '....' would be overwritten by merge. Aborting Message-ID: In-Reply-To: Nguyen Thai Ngoc Duy writes: > On Tue, Nov 16, 2010 at 6:24 PM, Nguyen Thai Ngoc Duy wrote: >> +static int identical_content(struct cache_entry *ce, struct stat *st) >> +{ >> +       unsigned char sha1[20]; >> +       return !index_path(sha1, ce->name, st, 0) && !hashcmp(sha1, ce->sha1); I do like the idea. > 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. -- Matthieu Moy http://www-verimag.imag.fr/~moy/