From: Kyle J. McKay Date: Fri, 7 Mar 2014 20:04:54 +0000 (-0800) Subject: clone.sh/update.sh: add --force to git fast-import X-Git-Url: https://repo.or.cz/w/girocco.git/commitdiff_plain/4226a1799104dd0a5901fd87f825f1c045e272d5 clone.sh/update.sh: add --force to git fast-import Both bzr and darcs mirrors make use of git fast-import. Add the --force option to git fast-import so that they support fetching non-fast-forward updates. --- diff --git a/jobd/update.sh b/jobd/update.sh index f40fc41..2f99fdc 100755 --- a/jobd/update.sh +++ b/jobd/update.sh @@ -17,7 +17,7 @@ git_darcs_fetch() { $( exec 4>&3 3>&1 1>&4 4>&- { _e1=0; "$cfg_basedir"/bin/darcs-fast-export --export-marks=$(pwd)/dfe-marks --import-marks=$(pwd)/dfe-marks "$1" 3>&- || _e1=$?; echo $_e1 >&3; } | \ - { _e2=0; git fast-import --export-marks=$(pwd)/gfi-marks --import-marks=$(pwd)/gfi-marks 3>&- || _e2=$?; echo $_e2 >&3; } + { _e2=0; git fast-import --force --export-marks=$(pwd)/gfi-marks --import-marks=$(pwd)/gfi-marks 3>&- || _e2=$?; echo $_e2 >&3; } ) EOT exec 3>&- @@ -34,7 +34,7 @@ git_bzr_fetch() { $( exec 4>&3 3>&1 1>&4 4>&- { _e1=0; bzr fast-export --export-marks=$(pwd)/dfe-marks --import-marks=$(pwd)/dfe-marks "$1" 3>&- || _e1=$?; echo $_e1 >&3; } | \ - { _e2=0; git fast-import --export-marks=$(pwd)/gfi-marks --import-marks=$(pwd)/gfi-marks 3>&- || _e2=$?; echo $_e2 >&3; } + { _e2=0; git fast-import --force --export-marks=$(pwd)/gfi-marks --import-marks=$(pwd)/gfi-marks 3>&- || _e2=$?; echo $_e2 >&3; } ) EOT exec 3>&- diff --git a/taskd/clone.sh b/taskd/clone.sh index 4d82789..9f960df 100755 --- a/taskd/clone.sh +++ b/taskd/clone.sh @@ -13,7 +13,7 @@ git_darcs_fetch() { $( exec 4>&3 3>&1 1>&4 4>&- { _e1=0; "$cfg_basedir"/bin/darcs-fast-export --export-marks=$(pwd)/dfe-marks "$1" 3>&- || _e1=$?; echo $_e1 >&3; } | \ - { _e2=0; git fast-import --export-marks=$(pwd)/gfi-marks 3>&- || _e2=$?; echo $_e2 >&3; } + { _e2=0; git fast-import --force --export-marks=$(pwd)/gfi-marks 3>&- || _e2=$?; echo $_e2 >&3; } ) EOT exec 3>&- @@ -30,7 +30,7 @@ git_bzr_fetch() { $( exec 4>&3 3>&1 1>&4 4>&- { _e1=0; bzr fast-export --export-marks=$(pwd)/bfe-marks "$1" 3>&- || _e1=$?; echo $_e1 >&3; } | \ - { _e2=0; git fast-import --export-marks=$(pwd)/gfi-marks 3>&- || _e2=$?; echo $_e2 >&3; } + { _e2=0; git fast-import --force --export-marks=$(pwd)/gfi-marks 3>&- || _e2=$?; echo $_e2 >&3; } ) EOT exec 3>&-