Subject: [PATCH] git-fetch-pack: Do not use git-rev-list
[git.git] / prune-packed.c
index 73f0f3a..26123f7 100644 (file)
@@ -27,8 +27,7 @@ static void prune_dir(int i, DIR *dir, char *pathname, int len)
                        error("unable to unlink %s", pathname);
        }
        pathname[len] = 0;
-       if (rmdir(pathname))
-               mkdir(pathname, 0777);
+       rmdir(pathname);
 }
 
 static void prune_packed_objects(void)
@@ -72,6 +71,7 @@ int main(int argc, char **argv)
                /* Handle arguments here .. */
                usage(prune_packed_usage);
        }
+       sync();
        prune_packed_objects();
        return 0;
 }