diff --git a/prune-packed.c b/prune-packed.c
index 5306e8e5ef411bfa7e6bcf4ba0639e640592818b..d24b097114ef2610416b106ea9aa2000873924f3 100644 (file)
--- a/prune-packed.c
+++ b/prune-packed.c
else if (unlink(pathname) < 0)
error("unable to unlink %s", pathname);
}
else if (unlink(pathname) < 0)
error("unable to unlink %s", pathname);
}
+ pathname[len] = 0;
+ rmdir(pathname);
}
static void prune_packed_objects(void)
}
static void prune_packed_objects(void)
sprintf(pathname + len, "%02x/", i);
d = opendir(pathname);
if (!d)
sprintf(pathname + len, "%02x/", i);
d = opendir(pathname);
if (!d)
- die("unable to open %s", pathname);
+ continue;
prune_dir(i, d, pathname, len + 3);
closedir(d);
}
prune_dir(i, d, pathname, len + 3);
closedir(d);
}
{
int i;
{
int i;
+ setup_git_directory();
+
for (i = 1; i < argc; i++) {
const char *arg = argv[i];
for (i = 1; i < argc; i++) {
const char *arg = argv[i];
/* Handle arguments here .. */
usage(prune_packed_usage);
}
/* Handle arguments here .. */
usage(prune_packed_usage);
}
+ sync();
prune_packed_objects();
return 0;
}
prune_packed_objects();
return 0;
}