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 <kha@treskal.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
test $(stg applied | wc -l) = 1
'
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)
+ '
+