From 6ee3d5ebe5f268a52d0c032c26a98b71044c6bd0 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Thu, 23 Apr 2015 22:43:43 -0700 Subject: [PATCH] clone.sh: do a pack-refs after initial clone For those repositories with a simply horrid number of refs, doing a pack-refs right after the initial clone can improve performance. Signed-off-by: Kyle J. McKay --- taskd/clone.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/taskd/clone.sh b/taskd/clone.sh index 952bfe0..f9e93f1 100755 --- a/taskd/clone.sh +++ b/taskd/clone.sh @@ -352,6 +352,11 @@ perms=g+w [ "$cfg_permission_control" != "Hooks" ] || perms=go+w chmod $perms $(find objects -maxdepth 1 -type d) 2>/dev/null || : +# We may have just cloned a lot of refs and they will all be +# individual files at this point. Let's pack them now so we +# can have better performance right from the start. +git pack-refs --all + # Initialize gitweb.lastreceive, gitweb.lastchange and info/lastactivity git config gitweb.lastreceive "$(date '+%a, %d %b %Y %T %z')" git config gitweb.lastchange "$(date '+%a, %d %b %Y %T %z')" -- 2.11.4.GIT