summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fee7545)
raw | patch | inline | side by side (parent: fee7545)
author | Alex Riesen <raa.lkml@gmail.com> | |
Thu, 25 Sep 2008 20:12:45 +0000 (22:12 +0200) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Fri, 26 Sep 2008 15:05:20 +0000 (08:05 -0700) |
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>
Noticed by Anders Melchiorsen.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
builtin-merge-recursive.c | patch | blob | history | |
t/t3030-merge-recursive.sh | patch | blob | history |
index 43e55bf90154c51b94527b2ab7eb7c60fe36e9ec..f628a62751d25d394c722bbc03f9367d3973fdd0 100644 (file)
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;
}
index de0cdb1cf4e4dbb6395619bdd2f56c0b027fdea7..0de613dc53d85c01f6d122834e094503a2736507 100755 (executable)
'
+test_expect_success 'merge removes empty directories' '
+
+ git reset --hard master &&
+ git checkout -b rm &&
+ git rm d/e &&
+ git commit -mremoved-d/e &&
+ git checkout master &&
+ git merge -s recursive rm &&
+ test_must_fail test -d d
+'
+
test_done