summaryrefslogtreecommitdiff
path: root/read-tree.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-07 22:17:33 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-07 22:17:33 (GMT)
commitb5b425074e5f84f261b1290b1a83eca635c49147 (patch)
treebaa081569a1a1c671593aeacd8c225998fcff24a /read-tree.c
parentccef66b55a6a2eb2c5f6a9dd29a86b181df21af9 (diff)
downloadgit-b5b425074e5f84f261b1290b1a83eca635c49147.zip
git-b5b425074e5f84f261b1290b1a83eca635c49147.tar.gz
git-b5b425074e5f84f261b1290b1a83eca635c49147.tar.bz2
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.
Diffstat (limited to 'read-tree.c')
-rw-r--r--read-tree.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/read-tree.c b/read-tree.c
index 8eb2432..cf6d28e 100644
--- a/read-tree.c
+++ b/read-tree.c
@@ -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)