X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=unpack-trees.c;h=7cfd628d8e1c576115cb934e72138535fb7d2db3;hb=73bcf53342f16a66ae4e02ed50a08bd34d846bfb;hp=e496d8cd31b54dd3d278499d7d85439478181ce8;hpb=6f002f984f1d1ddfdae990582a423dc5263697ae;p=git.git diff --git a/unpack-trees.c b/unpack-trees.c index e496d8cd3..7cfd628d8 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -200,7 +200,7 @@ static int unpack_trees_rec(struct tree_entry_list **posns, int len, any_files = 1; - memcpy(ce->sha1, posns[i]->sha1, 20); + hashcpy(ce->sha1, posns[i]->sha1); src[i + o->merge] = ce; subposns[i] = df_conflict_list; posns[i] = posns[i]->next; @@ -278,7 +278,7 @@ static void unlink_entry(char *name) } } -static volatile sig_atomic_t progress_update = 0; +static volatile sig_atomic_t progress_update; static void progress_interval(int signum) { @@ -417,7 +417,7 @@ static int same(struct cache_entry *a, struct cache_entry *b) if (!a && !b) return 1; return a->ce_mode == b->ce_mode && - !memcmp(a->sha1, b->sha1, 20); + !hashcmp(a->sha1, b->sha1); } @@ -642,7 +642,7 @@ int threeway_merge(struct cache_entry **stages, (remote_deleted && head && head_match)) { if (index) return deleted_entry(index, index, o); - else if (path) + else if (path && !head_deleted) verify_absent(path, "removed", o); return 0; } @@ -661,8 +661,6 @@ int threeway_merge(struct cache_entry **stages, if (index) { verify_uptodate(index, o); } - else if (path) - verify_absent(path, "overwritten", o); o->nontrivial_merge = 1;