summaryrefslogtreecommitdiff
path: root/backflip
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2016-06-07 14:27:30 +0200
committerChristophe Lyon <christophe.lyon@linaro.org>2016-06-07 15:28:57 +0200
commitc2d846d1ac1c4f2c66bb93bcf2f78fdd48bc4deb (patch)
tree00c419873aa84149f3b7793f17e85ad38a965e6b /backflip
parent886210530f658e0dc1506c839a15cf353702e278 (diff)
backflip: Handle errors from git checkout/git review.
Catch more errors in order to exit with an error code in such cases. Change-Id: Ia7ec6aef3e81d4c0d5b5dcb0cc7b0792e9af0463
Diffstat (limited to 'backflip')
-rwxr-xr-xbackflip8
1 files changed, 8 insertions, 0 deletions
diff --git a/backflip b/backflip
index 7eb30e6..e05a190 100755
--- a/backflip
+++ b/backflip
@@ -321,6 +321,10 @@ if $INTERACTIVE; then
else
print_info "Create backport branch."
git checkout -b ${bname} ${DEV_BRANCH}
+ if [ $? -ne 0 ]; then
+ print_info "Cannot checkout $DEV_BRANCH branch"
+ clean 1
+ fi
print_info "Commit backport."
if $STACKED; then
git commit --amend -F ${PREFIX}.msg
@@ -347,6 +351,10 @@ if $INTERACTIVE; then
else
print_info "Request review."
git review $REF_BRANCH
+ if [ $? -ne 0 ]; then
+ print_info "Cannot request review"
+ clean 1
+ fi
fi
# ==============================================================================