diff options
author | Vishal Bhoj <vishal.bhoj@linaro.org> | 2016-06-14 20:28:40 +0530 |
---|---|---|
committer | Vishal Bhoj <vishal.bhoj@linaro.org> | 2016-08-31 15:51:16 +0000 |
commit | 47dd7577247f7bf22b076a487d9465ddf93b4c07 (patch) | |
tree | 3a1da07e1389f8c42c28adb57e9d64d9bd601ae2 | |
parent | 431473d1c1af20dbd335ed254d8ef456e20daaf4 (diff) | |
download | android-patchsets-47dd7577247f7bf22b076a487d9465ddf93b4c07.tar.gz |
git reset when patch fails to apply
Change-Id: I64cb084a4d78d423fc4f143037cde661fd951ed7
Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
-rw-r--r-- | functions | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -47,6 +47,7 @@ apply() { fi if ! git cherry-pick FETCH_HEAD; then echo "$2 failed to apply, please fix" + git reset --hard exit 1 fi PATCHES=$((PATCHES+1)) @@ -80,6 +81,7 @@ cherrypick() { echo "=== Cherry-picking $2 ===" if ! git cherry-pick "$2"; then echo "$2 failed to apply, please fix" + git reset --hard exit 1 fi PATCHES=$((PATCHES+1)) @@ -103,6 +105,7 @@ revert() { else if ! git revert --no-edit "$2"; then echo "$2 failed to revert, please fix" + git reset --hard exit 1 fi fi |