X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/539fb2921209bd3fd6165baa057f76f474aa5cb4..fd52912d651e59701714b4b957757bca4725a728:/t/t1202-push-undo.sh diff --git a/t/t1202-push-undo.sh b/t/t1202-push-undo.sh index 45dabb4..544fe8d 100755 --- a/t/t1202-push-undo.sh +++ b/t/t1202-push-undo.sh @@ -21,7 +21,7 @@ test_expect_success \ ' stg new foo -m foo && echo foo > test && - stg add test && + git add test && stg refresh ' @@ -30,7 +30,7 @@ test_expect_success \ ' stg new bar -m bar && echo bar > test && - stg add test && + git add test && stg refresh ' @@ -40,16 +40,30 @@ test_expect_success \ stg pop --all ' -test_expect_failure \ +test_expect_success \ 'Push the second patch with conflict' \ ' - stg push bar + conflict_old stg push bar ' test_expect_success \ 'Undo the previous push' \ ' - stg status --reset && + stg push --undo + ' + +test_expect_success \ + 'Check the push after undo fails as well' \ + ' + conflict_old stg push bar + ' + +test_expect_success \ + 'Undo with disappeared newborn' \ + ' + touch newfile && + git add newfile && + rm newfile && stg push --undo '