]> asedeno.scripts.mit.edu Git - git.git/blobdiff - git-rebase--interactive.sh
Merge git://repo.or.cz/git-gui
[git.git] / git-rebase--interactive.sh
index a563dea9b5313eaf60bd218cee166e6a17de93c0..1172e47571dfe1d6dd088381d63045fd5eae3db3 100755 (executable)
@@ -26,6 +26,7 @@ i,interactive      always used (no-op)
 continue           continue rebasing process
 abort              abort rebasing process and restore original branch
 skip               skip current patch and continue rebasing process
 continue           continue rebasing process
 abort              abort rebasing process and restore original branch
 skip               skip current patch and continue rebasing process
+no-verify          override pre-rebase hook from stopping the operation
 "
 
 . git-sh-setup
 "
 
 . git-sh-setup
@@ -42,6 +43,7 @@ PRESERVE_MERGES=
 STRATEGY=
 ONTO=
 VERBOSE=
 STRATEGY=
 ONTO=
 VERBOSE=
+OK_TO_SKIP_PRE_REBASE=
 
 GIT_CHERRY_PICK_HELP="  After resolving the conflicts,
 mark the corrected paths with 'git add <paths>', and
 
 GIT_CHERRY_PICK_HELP="  After resolving the conflicts,
 mark the corrected paths with 'git add <paths>', and
@@ -67,7 +69,8 @@ output () {
 }
 
 run_pre_rebase_hook () {
 }
 
 run_pre_rebase_hook () {
-       if test -x "$GIT_DIR/hooks/pre-rebase"
+       if test -z "$OK_TO_SKIP_PRE_REBASE" &&
+          test -x "$GIT_DIR/hooks/pre-rebase"
        then
                "$GIT_DIR/hooks/pre-rebase" ${1+"$@"} || {
                        echo >&2 "The pre-rebase hook refused to rebase."
        then
                "$GIT_DIR/hooks/pre-rebase" ${1+"$@"} || {
                        echo >&2 "The pre-rebase hook refused to rebase."
@@ -170,7 +173,7 @@ pick_one_preserving_merges () {
 
        if test -f "$DOTEST"/current-commit
        then
 
        if test -f "$DOTEST"/current-commit
        then
-               if [ "$fast_forward" == "t" ]
+               if test "$fast_forward" = t
                then
                        cat "$DOTEST"/current-commit | while read current_commit
                        do
                then
                        cat "$DOTEST"/current-commit | while read current_commit
                        do
@@ -437,6 +440,11 @@ get_saved_options () {
 while test $# != 0
 do
        case "$1" in
 while test $# != 0
 do
        case "$1" in
+       --no-verify)
+               OK_TO_SKIP_PRE_REBASE=yes
+               ;;
+       --verify)
+               ;;
        --continue)
                is_standalone "$@" || usage
                get_saved_options
        --continue)
                is_standalone "$@" || usage
                get_saved_options