Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNanako Shiraishi <nanako3@lavabit.com>2008-10-06 09:14:29 +0400
committerShawn O. Pearce <spearce@spearce.org>2008-10-06 20:00:56 +0400
commitc44276563f96bba7133e3ee4144b7e0364d499b9 (patch)
treec0ef7c3b6a31e0e88cd9f7b54daee536d13215ec /t
parent276328ffb87cefdc515bee5f09916aea6e0244ed (diff)
rebase --no-verify
It is sometimes desirable to disable the safety net of pre-rebase hook when the user knows what he is doing (for example, when the original changes on the branch have not been shown to the public yet). This teaches --no-verify option to git-rebase, which is similar to the way pre-commit hook is bypassed by git-commit. Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 't')
-rwxr-xr-xt/t3409-rebase-hook.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t3409-rebase-hook.sh b/t/t3409-rebase-hook.sh
index bc93dda8fd..1f1b850677 100755
--- a/t/t3409-rebase-hook.sh
+++ b/t/t3409-rebase-hook.sh
@@ -123,4 +123,20 @@ test_expect_success 'pre-rebase hook stops rebase (2)' '
test 0 = $(git rev-list HEAD...side | wc -l)
'
+test_expect_success 'rebase --no-verify overrides pre-rebase (1)' '
+ git checkout test &&
+ git reset --hard side &&
+ git rebase --no-verify master &&
+ test "z$(git symbolic-ref HEAD)" = zrefs/heads/test &&
+ test "z$(cat git)" = zworld
+'
+
+test_expect_success 'rebase --no-verify overrides pre-rebase (2)' '
+ git checkout test &&
+ git reset --hard side &&
+ EDITOR=true git rebase --no-verify -i master &&
+ test "z$(git symbolic-ref HEAD)" = zrefs/heads/test &&
+ test "z$(cat git)" = zworld
+'
+
test_done