From 93969438dca50c7f0039fcf35e7ab82776d4122f Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 4 Aug 2007 21:48:08 -0700 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- builtin-apply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.26.2