From: Yann Dirson Date: Tue, 12 Jun 2007 21:57:06 +0000 (+0100) Subject: Test "stg rebase" after "stg commit" X-Git-Tag: v0.13~44 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/a02ba4077f12578fe31c99d903488804a656e1c4?ds=sidebyside Test "stg rebase" after "stg commit" Two new tests for "stg rebase": 1. Try to rebase to a commit that is ahead of HEAD. This should work, and does. 2. Try to commit a patch, and then rebase. This doesn't work, because "stg rebase" aborts if orig-base != base, and "stg commit" doesn't update orig-base. (It does work if "stg rebase" is given the --force flag.) Signed-off-by: Karl Hasselström Signed-off-by: Karl Hasselström --- diff --git a/t/t2200-rebase.sh b/t/t2200-rebase.sh index c142e08..d9b6faf 100755 --- a/t/t2200-rebase.sh +++ b/t/t2200-rebase.sh @@ -43,4 +43,20 @@ test_expect_success \ test $(stg applied | wc -l) = 1 ' +test_expect_success \ + 'Rebase to next commit' \ + ' + stg rebase master && + test $(stg id base@stack) = $(git rev-parse master) + ' + +test_expect_success \ + 'Commit the patch and rebase again' \ + ' + stg commit && + git tag committed-here && + stg rebase master && + test $(stg id base@stack) = $(git rev-parse master) + ' + test_done