X-Git-Url: https://oss.titaniummirror.com/gitweb?p=git-utils.git;a=blobdiff_plain;f=update-mirror;fp=update-mirror;h=b68e8c10b8e6d65954cb2ca591244f6263876489;hp=dde92db00ad28b459cf31d63b1238dc1778f1dce;hb=2650ac381e7604c5073f7acaff43169ae6bdc1d2;hpb=5a0964b8bfd750dd118a1b10736ff9541b61b2fd 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