Re: Bogus error: Untracked working tree file '....' would be overwritten by merge. Aborting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 16, 2010 at 6:24 PM, Nguyen Thai Ngoc Duy <pclouds@xxxxxxxxx> 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);

Even better, do a file size check here. If it's not equal, there's no
point in calling the expensive index_path().
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]