bug avec git clone lors du basculement sur la branche develop

This commit is contained in:
Jephté Clain 2016-08-30 16:46:20 +04:00
parent 5bef9b104a
commit 2fbc599113
2 changed files with 13 additions and 3 deletions

View File

@ -375,10 +375,15 @@ function __runsmod_clone_or_pull() {
mkdirof "$repodir"
git clone ${RUNSMOD_SHALLOW:+--depth 1} "$repourl" "$repodir" || return $?
if [ "$RUNSMOD_MODE" == devel ]; then
( cd "$repodir"; git_have_rbranch develop && git checkout develop ) || return $?
(
cd "$repodir"
if git_have_rbranch develop; then
git checkout develop || exit 1
fi
) || return $?
fi
git_annex_initial "$repodir" || return $?
return $?
return 0
else
estepe "noclone $(ppath "$repodir")"
return 1

View File

@ -274,7 +274,12 @@ elif [ "$CMD" == clone ]; then
git_annex_use_ssh_wrapper
git clone "$repourl" "$destdir" || die
( cd "$destdir"; git_have_rbranch develop && git checkout develop ) || die
(
cd "$destdir"
if git_have_rbranch develop; then
git checkout develop || exit 1
fi
) || die
git_annex_initial "$destdir" || die
elif [ "$CMD" == crone ]; then