]> asedeno.scripts.mit.edu Git - git.git/blobdiff - merge-recursive.c
Merge branch 'rz/grepz'
[git.git] / merge-recursive.c
index 08917314fb18a2c5af71cf96c410d2c8363a2650..6bc3eac85c46700b1ed7ab93bce6ecf859fa13f9 100644 (file)
@@ -19,6 +19,7 @@
 #include "interpolate.h"
 #include "attr.h"
 #include "merge-recursive.h"
+#include "dir.h"
 
 static struct tree *shift_tree_object(struct tree *one, struct tree *two)
 {
@@ -392,22 +393,6 @@ static int update_stages(const char *path, struct diff_filespec *o,
        return 0;
 }
 
-static int remove_path(const char *name)
-{
-       char *slash, *dirs;
-
-       if (unlink(name))
-               return -1;
-       dirs = xstrdup(name);
-       while ((slash = strrchr(name, '/'))) {
-               *slash = '\0';
-               if (rmdir(name) != 0)
-                       break;
-       }
-       free(dirs);
-       return 0;
-}
-
 static int remove_file(struct merge_options *o, int clean,
                       const char *path, int no_wd)
 {