From 2fbc599113caa94d2d3488afee135723e1e7dd07 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Tue, 30 Aug 2016 16:46:20 +0400 Subject: [PATCH] bug avec git clone lors du basculement sur la branche develop --- lib/ulib/runsmod | 9 +++++++-- uproject | 7 ++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/ulib/runsmod b/lib/ulib/runsmod index b2674e9..7f606a9 100644 --- a/lib/ulib/runsmod +++ b/lib/ulib/runsmod @@ -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 diff --git a/uproject b/uproject index 9e48dbc..9d0e14d 100755 --- a/uproject +++ b/uproject @@ -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