blob: 3cef1ef51cfdebb424a5dcc826fbe37ac403df75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh
GITROOT=/ftp/tcosproject.org/gitroot
#touch -m -t 200812251841 $REPO/refs/heads/master
for d in $GITROOT/*.git ; do
( cd $d ;
date=$(git log -n1 --pretty=format:"%ai"| awk '{print $1$2}'| awk -F":" '{print $1$2}' | sed -e 's/-//g') ;
echo "git=$d date=$date";
git gc;
# git gc removes refs/heads/master
# cgit need it to show idle times
# http://n2.nabble.com/%22git-gc%22-removes-%22.git-refs-heads-master%22.-td2240880.html
ID=$(grep master packed-refs );
[ ! -e refs/heads/master ] && echo "$ID" > refs/heads/master;
git update-server-info ;
touch -c -m -t $date refs/heads/master )
done
|