test_expect_success \
'Setup and clone tree, and setup changes' \
"(cd foo &&
- printf 'a\nb\n' > file && git add file && git commit -m .
+ printf 'a\nb\n' > file && stg add file && git commit -m .
) &&
stg clone foo bar &&
(cd bar && stg new p1 -m p1
test_expect_success \
'Port those patches to orig tree' \
'(cd foo &&
- GIT_DIR=../bar/.git git-format-patch --stdout \
- $(cd ../bar && stg id base@master)..HEAD |
- git-am -3 -k
+ 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' \
- "(cd bar && stg push --undo && stg push --all --merged
+ "(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