diff options
author | Alex Riesen <raa.lkml@gmail.com> | 2008-09-25 22:12:45 +0200 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2008-09-26 08:05:20 -0700 |
commit | 41f13af558db1018250ade4d99a51f0b76f65bc8 (patch) | |
tree | dc814ce79f66195754488b50889f8808d79dfb73 /builtin-merge-recursive.c | |
parent | fee75457fc45e299c2a962bb9c3949f33f176c02 (diff) | |
download | git-41f13af558db1018250ade4d99a51f0b76f65bc8.tar.gz |
Remove empty directories in recursive merge
The code was actually supposed to do that, but was accidentally broken.
Noticed by Anders Melchiorsen.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'builtin-merge-recursive.c')
-rw-r--r-- | builtin-merge-recursive.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin-merge-recursive.c b/builtin-merge-recursive.c index 43e55bf901..f628a62751 100644 --- a/builtin-merge-recursive.c +++ b/builtin-merge-recursive.c @@ -444,10 +444,8 @@ static int remove_file(int clean, const char *path, int no_wd) return -1; } if (update_working_directory) { - unlink(path); - if (errno != ENOENT || errno != EISDIR) + if (remove_path(path) && errno != ENOENT) return -1; - remove_path(path); } return 0; } |