From: Junio C Hamano Date: Tue, 16 May 2006 00:58:02 +0000 (-0700) Subject: Merge branch 'jc/apply' into next X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=4cb0e688d8d42c9291ff517328e541bc176b82a9;p=git.git Merge branch 'jc/apply' into next * jc/apply: git-am: use apply --cached apply --cached: apply a patch without using working tree. --- 4cb0e688d8d42c9291ff517328e541bc176b82a9 diff --cc apply.c index 8391daf9,b3b9b405..5bd50733 --- a/apply.c +++ b/apply.c @@@ -1894,9 -1915,9 +1916,10 @@@ static void remove_file(struct patch *p 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); } - unlink(patch->old_name); + if (!cached) + unlink(patch->old_name); } static void add_index_file(const char *path, unsigned mode, void *buf, unsigned long size)