summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-09 15:34:04 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-09 15:34:04 -0700
commitaa16021efcd969a44b480d0964e07d52167517db (patch)
treee59c56bfd2a1efd4ee07d502498731dca965843e /read-cache.c
parent22f77b772dd16e6b63ff7c0359fd37e7d14cc04d (diff)
downloadgit-aa16021efcd969a44b480d0964e07d52167517db.tar.gz
git-read-tree: remove deleted files in the working directory
Only when "-u" is used of course.
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/read-cache.c b/read-cache.c
index 0d949f691d..d358933b26 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -452,6 +452,8 @@ int write_cache(int newfd, struct cache_entry **cache, int entries)
for (i = 0; i < entries; i++) {
struct cache_entry *ce = cache[i];
+ if (!ce->ce_mode)
+ continue;
if (ce_write(&c, newfd, ce, ce_size(ce)) < 0)
return -1;
}