git-read-tree: make one-way merge also honor the "update" flag

It didn't set CE_UPDATE before, so "-u" was a no-op.
maint
Linus Torvalds 2005-06-07 15:17:33 -07:00
parent ccef66b55a
commit b5b425074e
1 changed files with 5 additions and 5 deletions

View File

@ -218,12 +218,12 @@ static int oneway_merge(struct cache_entry **src, struct cache_entry **dst)


if (!a) if (!a)
return 0; return 0;
if (old && same(old, a)) if (old && same(old, a)) {
*a = *old; *dst++ = old;
a->ce_flags &= ~htons(CE_STAGEMASK);
*dst++ = a;
return 1; return 1;
} }
return merged_entry(a, NULL, dst);
}


static void check_updates(struct cache_entry **src, int nr) static void check_updates(struct cache_entry **src, int nr)
{ {