From: Martin von Zweigbergk Date: Mon, 22 Nov 2010 20:21:01 +0000 (+0100) Subject: rebase: support --verify X-Git-Tag: v1.7.4-rc0~59^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7baf9c4b70784920e05f9be6614084ef8f64674d;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 30e5c0eb1..96680c845 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -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:: Ensure at least lines of surrounding context match before and after each change. When fewer lines of surrounding diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index a27952d9f..4eabe54e3 100755 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -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 " @@ -727,6 +728,7 @@ do OK_TO_SKIP_PRE_REBASE=yes ;; --verify) + OK_TO_SKIP_PRE_REBASE= ;; --continue) is_standalone "$@" || usage diff --git a/git-rebase.sh b/git-rebase.sh index 10a238ae3..7548f0cae 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -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?"