chiark
/
gitweb
/
~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simplify editor selection logic
[stgit]
/
t
/
t1300-uncommit.sh
diff --git
a/t/t1300-uncommit.sh
b/t/t1300-uncommit.sh
index 497c354cb381071bf2d1cc5e465296f1f5e66495..d86e579382a805cdb994e3eb27825da855120148 100755
(executable)
--- 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 new foo -m "Foo Patch" &&
echo foo > test &&
-
stg
add test &&
+
git
add test &&
stg refresh
'
stg refresh
'
@@
-28,38
+28,38
@@
test_expect_success \
'
stg new bar -m "Bar Patch" &&
echo bar > test &&
'
stg new bar -m "Bar Patch" &&
echo bar > test &&
-
stg
add test &&
+
git
add test &&
stg refresh
'
test_expect_success \
'Commit the patches' \
'
stg refresh
'
test_expect_success \
'Commit the patches' \
'
- stg commit
+ stg commit
--all
'
test_expect_success \
'Uncommit the patches using names' \
'
stg uncommit bar foo &&
'
test_expect_success \
'Uncommit the patches using names' \
'
stg uncommit bar foo &&
- [ "$(stg id foo//top)" =
=
"$(stg id bar//bottom)" ] &&
- stg commit
+ [ "$(stg id foo//top)" = "$(stg id bar//bottom)" ] &&
+ stg commit
--all
'
test_expect_success \
'Uncommit the patches using prefix' \
'
stg uncommit --number=2 foobar &&
'
test_expect_success \
'Uncommit the patches using prefix' \
'
stg uncommit --number=2 foobar &&
- [ "$(stg id foobar1//top)" =
=
"$(stg id foobar2//bottom)" ] &&
- stg commit
+ [ "$(stg id foobar1//top)" = "$(stg id foobar2//bottom)" ] &&
+ stg commit
--all
'
test_expect_success \
'Uncommit the patches using auto names' \
'
stg uncommit --number=2 &&
'
test_expect_success \
'Uncommit the patches using auto names' \
'
stg uncommit --number=2 &&
- [ "$(stg id foo-patch//top)" =
=
"$(stg id bar-patch//bottom)" ] &&
- stg commit
+ [ "$(stg id foo-patch//top)" = "$(stg id bar-patch//bottom)" ] &&
+ stg commit
--all
'
test_expect_success \
'
test_expect_success \
@@
-67,7
+67,15
@@
test_expect_success \
'
stg uncommit &&
stg uncommit &&
'
stg uncommit &&
stg uncommit &&
- [ "$(stg id foo-patch//top)" =
=
"$(stg id bar-patch//bottom)" ] &&
- stg commit
+ [ "$(stg id foo-patch//top)" = "$(stg id bar-patch//bottom)" ] &&
+ 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 --all
+'
+
test_done
test_done