X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/blobdiff_plain/0f4eba6a37c1a5454560b097873e5a22bfcde908..22037590baa995704b6cc08d844e024c85c7c578:/t/t2200-rebase.sh diff --git a/t/t2200-rebase.sh b/t/t2200-rebase.sh new file mode 100755 index 0000000..e2d9d9a --- /dev/null +++ b/t/t2200-rebase.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# +# Copyright (c) 2007 Yann Dirson +# + +test_description='Test the "rebase" command.' + +. ./test-lib.sh + +test_expect_success \ + 'Setup a multi-commit branch and fork an stgit stack' \ + ' + echo foo > file1 && + git add file1 && + git commit -m a && + echo foo > file2 && + git add file2 && + git commit -m b && + + stg branch --create stack && + stg new p -m . && + echo bar >> file1 && + stg refresh + ' + +test_expect_success \ + 'Rebase to previous commit' \ + ' + stg rebase master~1 && + test `git rev-parse bases/stack` = `git rev-parse master~1` + ' + +test_done