Skip to content

Commit 7baf9c4

Browse files
Martin von Zweigbergkgitster
authored andcommitted
rebase: support --verify
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>
1 parent 03276d9 commit 7baf9c4

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

Documentation/git-rebase.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,10 @@ which makes little sense.
279279
--no-verify::
280280
This option bypasses the pre-rebase hook. See also linkgit:githooks[5].
281281

282+
--verify::
283+
Allows the pre-rebase hook to run, which is the default. This option can
284+
be used to override --no-verify. See also linkgit:githooks[5].
285+
282286
-C<n>::
283287
Ensure at least <n> lines of surrounding context match before
284288
and after each change. When fewer lines of surrounding

git-rebase--interactive.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ continue continue rebasing process
2828
abort abort rebasing process and restore original branch
2929
skip skip current patch and continue rebasing process
3030
no-verify override pre-rebase hook from stopping the operation
31+
verify allow pre-rebase hook to run
3132
root rebase all reachable commmits up to the root(s)
3233
autosquash move commits that begin with squash!/fixup! under -i
3334
"
@@ -727,6 +728,7 @@ do
727728
OK_TO_SKIP_PRE_REBASE=yes
728729
;;
729730
--verify)
731+
OK_TO_SKIP_PRE_REBASE=
730732
;;
731733
--continue)
732734
is_standalone "$@" || usage

git-rebase.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,9 @@ do
205205
--no-verify)
206206
OK_TO_SKIP_PRE_REBASE=yes
207207
;;
208+
--verify)
209+
OK_TO_SKIP_PRE_REBASE=
210+
;;
208211
--continue)
209212
test -d "$dotest" -o -d "$GIT_DIR"/rebase-apply ||
210213
die "No rebase in progress?"

0 commit comments

Comments
 (0)