summaryrefslogtreecommitdiff
path: root/t/t3400-rebase.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-04-28 21:11:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-04-28 21:11:39 (GMT)
commit78c6e0f3fa41d697f2e01850b0a361e21095545d (patch)
tree672214a8fa5dfc78e80fae82e856c9f8f2f013f6 /t/t3400-rebase.sh
parentac9666f84a597973ef29dc7f0f7edcb3e1a3aa45 (diff)
parent45e2acf3d33b2bc635f14af0c1d9ce698328954f (diff)
downloadgit-78c6e0f3fa41d697f2e01850b0a361e21095545d.zip
git-78c6e0f3fa41d697f2e01850b0a361e21095545d.tar.gz
git-78c6e0f3fa41d697f2e01850b0a361e21095545d.tar.bz2
Merge branch 'mz/rebase'
* mz/rebase: (34 commits) rebase: define options in OPTIONS_SPEC Makefile: do not install sourced rebase scripts rebase: use @{upstream} if no upstream specified rebase -i: remove unnecessary state rebase-root rebase -i: don't read unused variable preserve_merges git-rebase--am: remove unnecessary --3way option rebase -m: don't print exit code 2 when merge fails rebase -m: remember allow_rerere_autoupdate option rebase: remember strategy and strategy options rebase: remember verbose option rebase: extract code for writing basic state rebase: factor out sub command handling rebase: make -v a tiny bit more verbose rebase -i: align variable names rebase: show consistent conflict resolution hint rebase: extract am code to new source file rebase: extract merge code to new source file rebase: remove $branch as synonym for $orig_head rebase -i: support --stat rebase: factor out call to pre-rebase hook ...
Diffstat (limited to 't/t3400-rebase.sh')
-rwxr-xr-xt/t3400-rebase.sh27
1 files changed, 18 insertions, 9 deletions
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 349eebd..6eaecec 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -158,15 +158,24 @@ test_expect_success 'Show verbose error when HEAD could not be detached' '
'
rm -f B
-test_expect_success 'dump usage when upstream arg is missing' '
- git checkout -b usage topic &&
- test_must_fail git rebase 2>error1 &&
- grep "[Uu]sage" error1 &&
- test_must_fail git rebase --abort 2>error2 &&
- grep "No rebase in progress" error2 &&
- test_must_fail git rebase --onto master 2>error3 &&
- grep "[Uu]sage" error3 &&
- ! grep "can.t shift" error3
+test_expect_success 'fail when upstream arg is missing and not on branch' '
+ git checkout topic &&
+ test_must_fail git rebase >output.out &&
+ grep "You are not currently on a branch" output.out
+'
+
+test_expect_success 'fail when upstream arg is missing and not configured' '
+ git checkout -b no-config topic &&
+ test_must_fail git rebase >output.out &&
+ grep "branch.no-config.merge" output.out
+'
+
+test_expect_success 'default to @{upstream} when upstream arg is missing' '
+ git checkout -b default topic &&
+ git config branch.default.remote .
+ git config branch.default.merge refs/heads/master
+ git rebase &&
+ test "$(git rev-parse default~1)" = "$(git rev-parse master)"
'
test_expect_success 'rebase -q is quiet' '