mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
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>
This commit is contained in:
parent
33a798c880
commit
93969438dc
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue