Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-05-29 09:57:47 +0400
committerJunio C Hamano <junkio@cox.net>2006-05-29 09:57:47 +0400
commit3f69d405d749742945afd462bff6541604ecd420 (patch)
tree8abc47e17be2680b2e93f3c8c0e503d66bdee3bc /builtin-apply.c
parent7d65848afd42f075f6db0d03da2c9f5a9bac6267 (diff)
parent7d55561986ffe94ca7ca22dc0a6846f698893226 (diff)
Merge branch 'jc/cache-tree'
* jc/cache-tree: (26 commits) builtin-rm: squelch compiler warnings. git-write-tree writes garbage on sparc64 Fix crash when reading the empty tree fsck-objects: do not segfault on missing tree in cache-tree cache-tree: a bit more debugging support. read-tree: invalidate cache-tree entry when a new index entry is added. Fix test-dump-cache-tree in one-tree disappeared case. fsck-objects: mark objects reachable from cache-tree cache-tree: replace a sscanf() by two strtol() calls cache-tree.c: typefix test-dump-cache-tree: validate the cached data as well. cache_tree_update: give an option to update cache-tree only. read-tree: teach 1-way merege and plain read to prime cache-tree. read-tree: teach 1 and 2 way merges about cache-tree. update-index: when --unresolve, smudge the relevant cache-tree entries. test-dump-cache-tree: report number of subtrees. cache-tree: sort the subtree entries. Teach fsck-objects about cache-tree. index: make the index file format extensible. cache-tree: protect against "git prune". ... Conflicts: Makefile, builtin.h, git.c: resolved the same way as in next.
Diffstat (limited to 'builtin-apply.c')
-rw-r--r--builtin-apply.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index 4056b9d67b..f16c753bee 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -8,6 +8,7 @@
*/
#include <fnmatch.h>
#include "cache.h"
+#include "cache-tree.h"
#include "quote.h"
#include "blob.h"
#include "delta.h"
@@ -1918,6 +1919,7 @@ static void remove_file(struct patch *patch)
if (write_index) {
if (remove_file_from_cache(patch->old_name) < 0)
die("unable to remove %s from index", patch->old_name);
+ cache_tree_invalidate_path(active_cache_tree, patch->old_name);
}
if (!cached)
unlink(patch->old_name);
@@ -2019,8 +2021,9 @@ static void create_file(struct patch *patch)
if (!mode)
mode = S_IFREG | 0644;
- create_one_file(path, mode, buf, size);
+ create_one_file(path, mode, buf, size);
add_index_file(path, mode, buf, size);
+ cache_tree_invalidate_path(active_cache_tree, path);
}
static void write_out_one_result(struct patch *patch)