author | Junio C Hamano <junkio@cox.net> | |
Tue, 16 May 2006 00:58:02 +0000 (17:58 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 16 May 2006 00:58:02 +0000 (17:58 -0700) |
* jc/apply:
git-am: use apply --cached
apply --cached: apply a patch without using working tree.
git-am: use apply --cached
apply --cached: apply a patch without using working tree.
1 | 2 | |||
---|---|---|---|---|
apply.c | patch | | diff1 | | diff2 | | blob | history |
git-am.sh | patch | | diff1 | | diff2 | | blob | history |
diff --cc apply.c
index 8391daf91772899c7b768de6f1aab272f2d2e79e,b3b9b40596ef4af5c2187b0d1227e17cadecd342..5bd50733656eee24f59486553f5afaaac9a784bc
+++ b/apply.c
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)
diff --cc git-am.sh
Simple merge