X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=git-rebase--interactive.sh;h=86290f63b25f921de5c78b087e111e6b872676fb;hb=310d188f7e1d1fbbeace17d5c62e422fd0b5a824;hp=bdec43c3f604b22d29b52bd6a026785a6ac0f21b;hpb=c9618ff939aeb5e895d90c2478db989038eccc26;p=git.git diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index bdec43c3f..86290f63b 100755 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -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 +no-verify override pre-rebase hook from stopping the operation " . git-sh-setup @@ -41,6 +42,7 @@ PRESERVE_MERGES= STRATEGY= ONTO= VERBOSE= +OK_TO_SKIP_PRE_REBASE= GIT_CHERRY_PICK_HELP=" After resolving the conflicts, mark the corrected paths with 'git add ', and @@ -66,7 +68,8 @@ output () { } 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." @@ -277,7 +280,7 @@ do_next () { "$DOTEST"/amend || exit read command sha1 rest < "$TODO" case "$command" in - '#'*|'') + '#'*|''|noop) mark_action_done ;; pick|p) @@ -421,6 +424,11 @@ get_saved_options () { while test $# != 0 do case "$1" in + --no-verify) + OK_TO_SKIP_PRE_REBASE=yes + ;; + --verify) + ;; --continue) is_standalone "$@" || usage get_saved_options @@ -584,6 +592,7 @@ first and then run 'git rebase --continue' again." --abbrev=7 --reverse --left-right --cherry-pick \ $UPSTREAM...$HEAD | \ sed -n "s/^>/pick /p" > "$TODO" + test -s "$TODO" || echo noop >> "$TODO" cat >> "$TODO" << EOF # Rebase $SHORTUPSTREAM..$SHORTHEAD onto $SHORTONTO