HADOOP-12244. recover broken rebase during precommit (aw)

Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/495f95e7
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/495f95e7
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/495f95e7

Branch: refs/heads/master
Commit: 495f95e788fdc58121781d45b96a69b69c34cf2a
Parents: 91cbda7
Author: Allen Wittenauer <[email protected]>
Authored: Thu Aug 13 12:30:41 2015 -0700
Committer: Allen Wittenauer <[email protected]>
Committed: Thu Aug 13 12:30:41 2015 -0700

----------------------------------------------------------------------
 dev-support/test-patch.sh | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/495f95e7/dev-support/test-patch.sh
----------------------------------------------------------------------
diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh
index 4dd15e6..13332b7 100755
--- a/dev-support/test-patch.sh
+++ b/dev-support/test-patch.sh
@@ -1290,6 +1290,12 @@ function git_checkout
     # we need to explicitly fetch in case the
     # git ref hasn't been brought in tree yet
     if [[ ${OFFLINE} == false ]]; then
+
+      if [[ -f .git/rebase-apply ]]; then
+        yetus_error "ERROR: previous rebase failed. Aborting it."
+        ${GIT} rebase --abort
+      fi
+
       ${GIT} pull --rebase
       if [[ $? != 0 ]]; then
         yetus_error "ERROR: git pull is failing"

Reply via email to