Skip to content

Commit

Permalink
git-read-tree: make one-way merge also honor the "update" flag
Browse files Browse the repository at this point in the history
It didn't set CE_UPDATE before, so "-u" was a no-op.
  • Loading branch information
Linus Torvalds committed Jun 7, 2005
1 parent ccef66b commit b5b4250
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions read-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,11 @@ static int oneway_merge(struct cache_entry **src, struct cache_entry **dst)

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

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

0 comments on commit b5b4250

Please sign in to comment.