X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/d2f50b5ddcdd7a517e3707f61e11f15c7ee9bada..4675b4bb7d2390a00da42cb2ddcc23c73d452756:/t/t1300-uncommit.sh diff --git a/t/t1300-uncommit.sh b/t/t1300-uncommit.sh index 2e7ff21..a906d13 100755 --- a/t/t1300-uncommit.sh +++ b/t/t1300-uncommit.sh @@ -19,7 +19,7 @@ test_expect_success \ ' stg new foo -m "Foo Patch" && echo foo > test && - stg add test && + git add test && stg refresh ' @@ -28,14 +28,14 @@ test_expect_success \ ' stg new bar -m "Bar Patch" && echo bar > test && - stg add test && + git add test && stg refresh ' test_expect_success \ 'Commit the patches' \ ' - stg commit + stg commit --all ' test_expect_success \ @@ -43,7 +43,7 @@ test_expect_success \ ' stg uncommit bar foo && [ "$(stg id foo//top)" = "$(stg id bar//bottom)" ] && - stg commit + stg commit --all ' test_expect_success \ @@ -51,7 +51,7 @@ test_expect_success \ ' stg uncommit --number=2 foobar && [ "$(stg id foobar1//top)" = "$(stg id foobar2//bottom)" ] && - stg commit + stg commit --all ' test_expect_success \ @@ -59,7 +59,7 @@ test_expect_success \ ' stg uncommit --number=2 && [ "$(stg id foo-patch//top)" = "$(stg id bar-patch//bottom)" ] && - stg commit + stg commit --all ' test_expect_success \ @@ -68,14 +68,19 @@ test_expect_success \ stg uncommit && stg uncommit && [ "$(stg id foo-patch//top)" = "$(stg id bar-patch//bottom)" ] && - stg commit + stg commit --all ' test_expect_success \ 'Uncommit the patches with --to' ' stg uncommit --to HEAD^ && [ "$(stg id foo-patch//top)" = "$(stg id bar-patch//bottom)" ] && - stg commit + stg commit --all +' + +test_expect_success 'Uncommit a commit with not precisely one parent' ' + stg uncommit -n 5 ; [ $? = 2 ] && + [ "$(echo $(stg series))" = "" ] ' test_done