@matheusbsbs / matheus-bagliano / commits / 93969438dc
Fork 0

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>

Linus Torvalds committed Aug 4, 2007 at 21:48 UTC 93969438dca50c7f0039fcf35e7ab82776d4122f
1 file changed +1 -1
builtin-apply.c
+1 -1
@@ -2489,7 +2489,7 @@ static void write_out_one_result(struct patch *patch, int phase)
2489 * thing: remove the old, write the new
2490 */
2491 if (phase == 0)
2492 - remove_file(patch, 0);
2492 + remove_file(patch, patch->is_rename);
2493 if (phase == 1)
2494 create_file(patch);
2495 }