X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=builtin-apply.c;h=6a4fb9663dbfac93a7c625c13d401f411e8f5178;hb=b3ca4e4ebba6915ea534c4b82cfc5d6f10b4c283;hp=69c8e6a6083456cb3e9c6389d49c7723b8854442;hpb=4868f3729acce2aa9512ded7179a895cc50f64c8;p=git.git diff --git a/builtin-apply.c b/builtin-apply.c index 69c8e6a6..6a4fb966 100644 --- a/builtin-apply.c +++ b/builtin-apply.c @@ -8,6 +8,7 @@ */ #include #include "cache.h" +#include "cache-tree.h" #include "quote.h" #include "blob.h" #include "delta.h" @@ -1935,6 +1936,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); @@ -2036,8 +2038,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)