aboutsummaryrefslogtreecommitdiff
path: root/builtin-apply.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2007-08-04 21:48:08 -0700
committerJunio C Hamano <gitster@pobox.com>2007-08-06 01:36:59 -0700
commit93969438dca50c7f0039fcf35e7ab82776d4122f (patch)
tree26c48b6cba5b173ecd065e5173141b145b2bfdd7 /builtin-apply.c
parent33a798c880f9a8bed1fe95531349e5e5ef1e0cd2 (diff)
downloadgit-93969438dca50c7f0039fcf35e7ab82776d4122f.tar.gz
git-93969438dca50c7f0039fcf35e7ab82776d4122f.tar.xz
apply: remove directory that becomes empty by renaming the last file away
We attempt to remove directory that becomes empty after removal of a file. We should do the same when we rename an existing file away. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-apply.c')
-rw-r--r--builtin-apply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index 490e23ef4..9ee939366 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -2489,7 +2489,7 @@ static void write_out_one_result(struct patch *patch, int phase)
* thing: remove the old, write the new
*/
if (phase == 0)
- remove_file(patch, 0);
+ remove_file(patch, patch->is_rename);
if (phase == 1)
create_file(patch);
}