diff --git a/builtin-apply.c b/builtin-apply.c
index 5ad371424b8019a97d1fb34045bb8e32134870aa..86d89a4a7e9240a75e1500bba524acdcec7f14d2 100644 (file)
--- a/builtin-apply.c
+++ b/builtin-apply.c
if (name) {
char *cp = name;
while (p_value) {
- cp = strchr(name, '/');
+ cp = strchr(cp, '/');
if (!cp)
break;
cp++;
if (update_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) {
if (S_ISGITLINK(patch->old_mode)) {
mode = S_IFREG | 0644;
create_one_file(path, mode, buf, size);
add_index_file(path, mode, buf, size);
- cache_tree_invalidate_path(active_cache_tree, path);
}
/* phase zero is to remove, phase one is to create */