From: Junio C Hamano Date: Tue, 16 May 2006 00:58:02 +0000 (-0700) Subject: Merge branch 'jc/apply' into next X-Git-Tag: v1.4.1-rc1~102 X-Git-Url: http://git.tremily.us/?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 8391daf91,b3b9b4059..5bd507336 --- 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)