path: root/prune-packed.c
diff options
authorLinus Torvalds <>2005-10-09 09:30:17 (GMT)
committerJunio C Hamano <>2005-10-28 09:01:42 (GMT)
commit9106c097ad87577019544f45fda11c4d73986597 (patch)
tree2c5d370f099ef78342624e224f9aa4a8b5c68dcd /prune-packed.c
parentc1aaa5d9ea4a148a964f8c4d6de8bc65f1dc44fd (diff)
Create object subdirectories on demand (phase II)
This removes the unoptimization. The previous round does not mind missing fan-out directories, but still makes sure they exist, lest older versions choke on a repository created/packed by it. This round does not play that nicely anymore -- empty fan-out directories are not created by init-db, and will stay removed by prune-packed. The prune command also removes empty fan-out directories. Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'prune-packed.c')
1 files changed, 1 insertions, 2 deletions
diff --git a/prune-packed.c b/prune-packed.c
index 1e0fc0c..16685d1 100644
--- a/prune-packed.c
+++ b/prune-packed.c
@@ -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)