From 9106c097ad87577019544f45fda11c4d73986597 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 9 Oct 2005 02:30:17 -0700 Subject: 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 --- prune-packed.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'prune-packed.c') diff --git a/prune-packed.c b/prune-packed.c index 1e0fc0cd9e..16685d1d8b 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) -- cgit v1.2.3