gitolite/contrib/adc/fork
Sitaram Chamarty 517786572d (adc fork) fork is now fast and space-efficient on the server
uses "git clone -l" then manually sets up the gl-creater and hooks

(thanks to Jeff and the kde gang for asking ;-)
2010-06-12 16:26:38 +05:30

21 lines
490 B
Bash
Executable file

#!/bin/sh
from=$1
to=$2
. $(dirname $0)/adc.common-functions
get_rights_and_owner $from
[ -z "$perm_read" ] && die "no read permissions on $from"
get_rights_and_owner $to
[ -z "$perm_create" ] && die "no create permissions on $to"
# clone $from to $to
git clone --bare -l $GL_REPO_BASE_ABS/$from.git $GL_REPO_BASE_ABS/$to.git
# fix up creator, and hooks
cd $GL_REPO_BASE_ABS/$to.git
echo $GL_USER > gl-creater
cp -R $GL_REPO_BASE_ABS/$from.git/hooks/* $GL_REPO_BASE_ABS/$to.git/hooks