X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/bcfe759bc421f8e3b5b5866434948b0e406f9a60..408fa7cbdbf88632a7a59b5207e7f564380ed2a6:/t/t1201-pull-trailing.sh diff --git a/t/t1201-pull-trailing.sh b/t/t1201-pull-trailing.sh index 142f894..d66ad26 100755 --- a/t/t1201-pull-trailing.sh +++ b/t/t1201-pull-trailing.sh @@ -28,21 +28,34 @@ test_expect_success \ test_expect_success \ 'Port those patches to orig tree' \ - "(cd foo && - GIT_DIR=../bar/.git git-format-patch --stdout bases/master..HEAD | - git-am -3 -k + '(cd foo && + GIT_DIR=../bar/.git git format-patch --stdout \ + $(cd ../bar && stg id master:{base})..HEAD | + git am -3 -k + ) + ' + +test_expect_success \ + 'Pull those patches applied upstream, without pushing' \ + "(cd bar && stg pull --nopush + ) +" + +test_expect_success \ + 'Try to push those patches without merge detection' \ + "(cd bar && stg push --all ) " test_expect_success \ 'Pull those patches applied upstream' \ - "(cd bar && stg pull + "(cd bar && stg undo && stg push --all --merged ) " test_expect_success \ 'Check that all went well' \ - "diff -u foo/file bar/file + "test_cmp foo/file bar/file " test_done