unpack-trees(): carry skip-worktree bit over in merged_entry()
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Thu, 20 Aug 2009 13:47:02 +0000 (20:47 +0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Aug 2009 00:13:33 +0000 (17:13 -0700)
In this code path, we would remove "old" and replace it with "merge".
"old" may have skip-worktree bit, so re-add it to "merge".

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
unpack-trees.c

index 3eda26359018b5e33fccf6e7b55dc13db7c748a1..dc6d74a16bd860709a5ede561b7b5c47d1b7b283 100644 (file)
@@ -680,6 +680,8 @@ static int merged_entry(struct cache_entry *merge, struct cache_entry *old,
                } else {
                        if (verify_uptodate(old, o))
                                return -1;
+                       if (ce_skip_worktree(old))
+                               update |= CE_SKIP_WORKTREE;
                        invalidate_ce_path(old, o);
                }
        }