From 23f867762d8482ac16fc351b1529f45880a740b9 Mon Sep 17 00:00:00 2001 From: IkiWiki Date: Mon, 2 Sep 2019 13:24:22 -0400 Subject: update git packing --- backend/resilient/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'backend/resilient') diff --git a/backend/resilient/__init__.py b/backend/resilient/__init__.py index 73e375c..ead6576 100644 --- a/backend/resilient/__init__.py +++ b/backend/resilient/__init__.py @@ -130,7 +130,8 @@ class ikiwiki: ikiwiki.synced = (status == 0) if ikiwiki.synced: - os.system('git gc') + os.system('git repack -d') + os.system('git prune-packed') os.system('git update-server-info') # /.git folder access can be seen as security access problem by web hosts, so alias to /git @@ -138,7 +139,7 @@ class ikiwiki: html_git_path = os.path.join(html_path, 'git') os.mkdir(html_git_path) - for path in ['objects', 'refs', 'HEAD', 'info', 'packed-refs']: + for path in ['objects/info', 'objects/packs', 'refs', 'HEAD', 'info', 'packed-refs']: git_subpath = os.path.join(git_path, path) html_git_subpath = os.path.join(html_git_path, path) if os.path.isdir(git_subpath): -- cgit v1.2.3