~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stgit.el: Honor stgit-find-copies-harder in stgit-diff-range
[stgit]
/
t
/
t1302-repair-interop.sh
diff --git
a/t/t1302-repair-interop.sh
b/t/t1302-repair-interop.sh
index
910b23a
..
cce3cf1
100755
(executable)
--- a/
t/t1302-repair-interop.sh
+++ b/
t/t1302-repair-interop.sh
@@
-4,7
+4,7
@@
test_description='Test git/StGit interoperability with "stg repair"'
test_expect_success 'Create some git-only history' '
echo foo > foo.txt &&
test_expect_success 'Create some git-only history' '
echo foo > foo.txt &&
-
git
add foo.txt &&
+
stg
add foo.txt &&
git commit -a -m foo &&
git tag foo-tag &&
for i in 0 1 2 3 4; do
git commit -a -m foo &&
git tag foo-tag &&
for i in 0 1 2 3 4; do
@@
-21,39
+21,39
@@
test_expect_success 'Create five patches' '
for i in 0 1 2 3 4; do
stg new p$i -m p$i;
done &&
for i in 0 1 2 3 4; do
stg new p$i -m p$i;
done &&
- [ "$(echo $(stg
applied
))" = "p0 p1 p2 p3 p4" ] &&
- [ "$(echo $(stg
unapplied
))" = "" ]
+ [ "$(echo $(stg
series --applied --noprefix
))" = "p0 p1 p2 p3 p4" ] &&
+ [ "$(echo $(stg
series --unapplied --noprefix
))" = "" ]
'
test_expect_success 'Pop two patches with git reset' '
git reset --hard HEAD~2 &&
'
test_expect_success 'Pop two patches with git reset' '
git reset --hard HEAD~2 &&
-
!
stg refresh &&
+
command_error
stg refresh &&
stg repair &&
stg refresh &&
stg repair &&
stg refresh &&
- [ "$(echo $(stg
applied
))" = "p0 p1 p2" ] &&
- [ "$(echo $(stg
unapplied
))" = "p3 p4" ]
+ [ "$(echo $(stg
series --applied --noprefix
))" = "p0 p1 p2" ] &&
+ [ "$(echo $(stg
series --unapplied --noprefix
))" = "p3 p4" ]
'
test_expect_success 'Create a new patch' '
stg new q0 -m q0 &&
'
test_expect_success 'Create a new patch' '
stg new q0 -m q0 &&
- [ "$(echo $(stg
applied
))" = "p0 p1 p2 q0" ] &&
- [ "$(echo $(stg
unapplied
))" = "p3 p4" ]
+ [ "$(echo $(stg
series --applied --noprefix
))" = "p0 p1 p2 q0" ] &&
+ [ "$(echo $(stg
series --unapplied --noprefix
))" = "p3 p4" ]
'
test_expect_success 'Go to an unapplied patch with with git reset' '
git reset --hard $(stg id p3) &&
'
test_expect_success 'Go to an unapplied patch with with git reset' '
git reset --hard $(stg id p3) &&
-
!
stg refresh &&
+
command_error
stg refresh &&
stg repair &&
stg refresh &&
stg repair &&
stg refresh &&
- [ "$(echo $(stg
applied
))" = "p0 p1 p2 p3" ] &&
- [ "$(echo $(stg
unapplied
))" = "q0 p4" ]
+ [ "$(echo $(stg
series --applied --noprefix
))" = "p0 p1 p2 p3" ] &&
+ [ "$(echo $(stg
series --unapplied --noprefix
))" = "q0 p4" ]
'
test_expect_success 'Go back to below the stack base with git reset' '
git reset --hard foo-tag &&
stg repair &&
'
test_expect_success 'Go back to below the stack base with git reset' '
git reset --hard foo-tag &&
stg repair &&
- [ "$(echo $(stg
applied
))" = "" ] &&
- [ "$(echo $(stg
unapplied
))" = "p0 p1 p2 p3 q0 p4" ]
+ [ "$(echo $(stg
series --applied --noprefix
))" = "" ] &&
+ [ "$(echo $(stg
series --unapplied --noprefix
))" = "p0 p1 p2 p3 q0 p4" ]
'
test_done
'
test_done