diff options
author | Nanako Shiraishi <nanako3@lavabit.com> | 2008-10-06 14:14:29 +0900 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2008-10-06 09:00:56 -0700 |
commit | c44276563f96bba7133e3ee4144b7e0364d499b9 (patch) | |
tree | c0ef7c3b6a31e0e88cd9f7b54daee536d13215ec /t/t3409-rebase-hook.sh | |
parent | 276328ffb87cefdc515bee5f09916aea6e0244ed (diff) | |
download | git-c44276563f96bba7133e3ee4144b7e0364d499b9.tar.gz |
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/t3409-rebase-hook.sh')
-rwxr-xr-x | t/t3409-rebase-hook.sh | 16 |
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 |