From cb55386eab289fdf30181c05d543f0176bff501c Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Sat, 19 Apr 2014 00:50:25 -0700 Subject: [PATCH] config: maintain a gitweb.lastparentgc date Whenever the parent of a fork copies objects into one of its child forks, update the child's lastparentgc date. This information can be used to help avoid unnecessary gc runs. --- jobd/gc.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jobd/gc.sh b/jobd/gc.sh index 5b38ffb..8ae11c2 100755 --- a/jobd/gc.sh +++ b/jobd/gc.sh @@ -131,6 +131,9 @@ if [ -d "../${forkdir##*/}" ]; then continue ln -f "$d"/* "$cfg_reporoot/$fork.git/$d" || : done + # Update the fork's lastparentgc date + GIT_DIR="$cfg_reporoot/$fork.git" git config \ + gitweb.lastparentgc "$(date '+%a, %d %b %Y %T %z')" done fi -- 2.11.4.GIT