summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIkiWiki <ikiwiki.info>2019-09-02 13:24:22 -0400
committerIkiWiki <ikiwiki.info>2019-09-02 13:24:22 -0400
commit23f867762d8482ac16fc351b1529f45880a740b9 (patch)
tree021a90fc1ee64f6cf004b873da7f0e8ac85a13d0
parentb52aedc76701b3e42acdb34ad2513b119dbaf7e0 (diff)
downloadstandingwithresilience-23f867762d8482ac16fc351b1529f45880a740b9.tar.gz
standingwithresilience-23f867762d8482ac16fc351b1529f45880a740b9.zip
update git packing
-rw-r--r--backend/resilient/__init__.py5
1 files changed, 3 insertions, 2 deletions
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):