5 if [ -e /tmp
/gitupdatelock
]; then
9 touch /tmp
/gitupdatelock
11 rootdir
="$cfg_reporoot"
16 progress
"+ `date` $dir"
17 # safe pruning: we put all our objects to all forks, then we can
18 # safely get rid of extra ones; repacks in forks will get rid of
19 # the redundant ones again then
21 if [ -d "$forkdir" ]; then
22 (cd "$forkdir" && get_repo_list_here
) |
23 (cd "$dir" && while read fork
; do
24 for d
in objects
/?? objects
/pack
; do
25 [ "$d" != "objects/??" ] ||
continue
26 mkdir
-p "$rootdir/$forkdir/$fork/$d"
27 ln -f "$d"/* "$rootdir/$forkdir/$fork/$d"
32 git
--git-dir="$dir" repack
-A -d --window-memory=3G
-l -q
33 git
--git-dir="$dir" prune
34 git
--git-dir="$dir" update-server-info
35 date -R >"$dir/.last_gc"
36 progress
"- `date` $dir"
43 done 2>&1 |
grep -v '^Pack.*created\.$'