Skip to content

Commit

Permalink
rebase: support --verify
Browse files Browse the repository at this point in the history
Interactive rebase allows the '--verify' option to be passed, but it will
be ignored. Implement proper support for the option for both interactive
and non-interactive rebase by making it override any previous
'--no-verify'.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Martin von Zweigbergk authored and gitster committed Nov 23, 2010
1 parent 03276d9 commit 7baf9c4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Documentation/git-rebase.txt
Expand Up @@ -279,6 +279,10 @@ which makes little sense.
--no-verify::
This option bypasses the pre-rebase hook. See also linkgit:githooks[5].

--verify::
Allows the pre-rebase hook to run, which is the default. This option can
be used to override --no-verify. See also linkgit:githooks[5].

-C<n>::
Ensure at least <n> lines of surrounding context match before
and after each change. When fewer lines of surrounding
Expand Down
2 changes: 2 additions & 0 deletions git-rebase--interactive.sh
Expand Up @@ -28,6 +28,7 @@ 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
verify allow pre-rebase hook to run
root rebase all reachable commmits up to the root(s)
autosquash move commits that begin with squash!/fixup! under -i
"
Expand Down Expand Up @@ -727,6 +728,7 @@ do
OK_TO_SKIP_PRE_REBASE=yes
;;
--verify)
OK_TO_SKIP_PRE_REBASE=
;;
--continue)
is_standalone "$@" || usage
Expand Down
3 changes: 3 additions & 0 deletions git-rebase.sh
Expand Up @@ -205,6 +205,9 @@ do
--no-verify)
OK_TO_SKIP_PRE_REBASE=yes
;;
--verify)
OK_TO_SKIP_PRE_REBASE=
;;
--continue)
test -d "$dotest" -o -d "$GIT_DIR"/rebase-apply ||
die "No rebase in progress?"
Expand Down

0 comments on commit 7baf9c4

Please sign in to comment.