author | Junio C Hamano <junkio@cox.net> | |
Mon, 15 May 2006 20:51:07 +0000 (13:51 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 15 May 2006 20:51:07 +0000 (13:51 -0700) |
* lt/oneway:
read-tree --reset -u fix.
read-tree --reset -u fix.
1 | 2 | |||
---|---|---|---|---|
read-tree.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc read-tree.c
index 3f0233954725397c8783f544f2f8d27125b82a13,e16e91b173163f2b514e965d5e5ba7b939ffa1de..aa6172b52eeadb4f118e5145c182270342a70bf0
--- 1/read-tree.c
--- 2/read-tree.c
+++ b/read-tree.c
return error("Cannot do a oneway merge of %d trees",
merge_size);
- if (!a)
+ if (!a) {
+ invalidate_ce_path(old);
return deleted_entry(old, NULL);
+ }
if (old && same(old, a)) {
- struct stat st;
- if (lstat(old->name, &st) || ce_match_stat(old, &st, 1))
- old->ce_flags |= htons(CE_UPDATE);
+ if (reset) {
+ struct stat st;
+ if (lstat(old->name, &st) ||
+ ce_match_stat(old, &st, 1))
+ old->ce_flags |= htons(CE_UPDATE);
+ }
return keep_entry(old);
}
return merged_entry(a, NULL);