3 # Copyright (c) 2007 Yann Dirson
6 test_description
='Test the "rebase" command.'
11 'Setup a multi-commit branch and fork an stgit stack' \
20 stg branch --create stack &&
27 'Rebase to previous commit' \
29 stg rebase master~1 &&
30 test `stg id base@stack` = `git rev-parse master~1` &&
31 test `stg applied | wc -l` = 1
35 'Attempt rebase to non-existing commit' \
37 ! stg rebase not-a-ref
41 'Check patches were re-applied' \
43 test $(stg applied | wc -l) = 1