summaryrefslogtreecommitdiff
path: root/backflip
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2016-03-08 14:06:32 +0100
committerChristophe Lyon <christophe.lyon@linaro.org>2016-03-08 14:06:32 +0100
commitb994677b73e0be6f161f9ba0fc0f2dd577358ea4 (patch)
treefc5c64cbff65b16cbbe62ae69110798fecb93cbe /backflip
parentb497638b06fb2452da630c9fc26b0bb91e91d222 (diff)
Exit with an error message if git checkout $DEV_BRANCH fails.
This can happen for instance in stacked backports, if the user didn't answer 'Y' when prompted to create a backport branch during the backport of the previous patch. Change-Id: I5ba0929c15727a904fdaae14880eada49600428f
Diffstat (limited to 'backflip')
-rwxr-xr-xbackflip4
1 files changed, 4 insertions, 0 deletions
diff --git a/backflip b/backflip
index b3dd49c..6eb6451 100755
--- a/backflip
+++ b/backflip
@@ -225,6 +225,10 @@ fi
print_step "Cherry-picking Revision"
# ==============================================================================
git checkout $DEV_BRANCH
+if [ $? -ne 0 ]; then
+ print_info "Cannot checkout $DEV_BRANCH branch"
+ clean 1
+fi
git cherry-pick -n $SHA1 2>/dev/null
# ==============================================================================