Skip to content

Commit

Permalink
apply: remove directory that becomes empty by renaming the last file …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Linus Torvalds authored and Junio C Hamano committed Aug 6, 2007
1 parent 33a798c commit 9396943
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 9396943

Please sign in to comment.