From: R. Steve McKown Date: Wed, 16 May 2012 15:31:59 +0000 (-0600) Subject: Fix mirroring of git repositories X-Git-Url: https://oss.titaniummirror.com/gitweb?p=git-utils.git;a=commitdiff_plain;h=2650ac381e7604c5073f7acaff43169ae6bdc1d2 Fix mirroring of git repositories --- diff --git a/update-mirror b/update-mirror index dde92db..b68e8c1 100755 --- a/update-mirror +++ b/update-mirror @@ -85,13 +85,14 @@ case "$url" in *) if [ -f "$cfg_reporoot/$projdir/.new_clone" ]; then - echo "[$proj] initial git-svn setup" - git remote rm origin >/dev/null 2>&1 || : - git remote add --mirror origin "$url" + echo "[$proj] initial git setup" + git --git-dir . --bare init + git --git-dir . remote rm origin >/dev/null 2>&1 || : + git --git-dir . remote add --mirror origin "$url" fi echo "[$proj] fetching new commits from upstream" - git remote update - git remote prune origin + git --git-dir . remote update + git --git-dir . remote prune origin ;; esac