13 # This removes any remnants from "$cfg_reporoot"/$proj.git _and_ gets rid
14 # of the group record.
15 perl
-I.
-MGirocco::Project
-e 'Girocco::Project->ghost('"'$proj'"')->delete;'
16 cd "$queuedir" && rm -rf "$proj"/* && rmdir -p "$proj"
23 # First, the boring clone itself
25 if [ -s objects
/info
/alternates
]; then
26 ref
=(--reference "$(cat objects/info/alternates | sed 's#/objects$##')")
28 bang git clone
"${ref[@]}" --bare "$url" repodir
30 # Double-check that we aren't going to overwrite anything existing
31 ! [ -d "$cfg_reporoot/$proj.git" ]
33 # Set up fork container if necessary
34 lproj
="$(echo "$proj" | sed 's/^\(.*\/\)\(.*\)/\1/')"
35 if [ z
"$lproj" != z
"$proj" ]; then
36 bang mkdir
-m 0775 -p "$cfg_reporoot/$lproj"
39 # Move us into our new home
40 bang
mv repodir
"$cfg_reporoot/$proj.git"
41 bang
chmod g
+w base_url owner description homepage README.html
42 bang
mv base_url owner description homepage README.html
"$cfg_reporoot/$proj.git/"
45 bang git
--git-dir="$cfg_reporoot/$proj.git" config
--bool --add mirror.allowed true
46 bang git
--git-dir="$cfg_reporoot/$proj.git" update-server-info
49 cd "$queuedir" && rm -rf "$proj"/* && rmdir -p "$proj"
50 # NO bang BELOW THIS POINT! rm -r depends on cwd.
52 mail -s "[$cfg_name] $proj clone completed" "$mail,$cfg_admin" <<EOT
53 Congratulations! The clone of project $proj just completed.
55 * GitWeb interface: $cfg_gitweburl/$proj.git
56 * Project settings: $cfg_webadmurl/editproj.cgi?name=$proj