'
stg new foo -m foo &&
echo foo > foo.txt &&
- stg add foo.txt &&
+ git add foo.txt &&
stg refresh
'
'Try to delete a non-existing patch' \
'
[ $(stg applied | wc -l) -eq 1 ] &&
- ! stg delete bar &&
+ command_error stg delete bar &&
[ $(stg applied | wc -l) -eq 1 ]
'
'
echo dirty >> foo.txt &&
[ $(stg applied | wc -l) -eq 1 ] &&
- ! stg delete foo &&
+ command_error stg delete foo &&
[ $(stg applied | wc -l) -eq 1 ] &&
git reset --hard
'
'
stg new foo -m foo &&
echo foo > foo.txt &&
- stg add foo.txt &&
+ git add foo.txt &&
stg refresh &&
stg pop
'
'
stg new foo -m foo &&
echo foo > foo.txt &&
- stg add foo.txt &&
+ git add foo.txt &&
stg refresh &&
stg new bar -m bar &&
echo bar > bar.txt &&
- stg add bar.txt &&
+ git add bar.txt &&
stg refresh
'
'Try to delete a non-topmost applied patch' \
'
[ $(stg applied | wc -l) -eq 2 ] &&
- ! stg delete foo &&
- [ $(stg applied | wc -l) -eq 2 ]
- '
-
-test_expect_success \
- 'Hide the topmost patch and try to delete it' \
- '
- [ $(stg applied | wc -l) -eq 2 ] &&
- stg hide bar &&
- stg delete bar &&
+ stg delete foo &&
[ $(stg applied | wc -l) -eq 1 ]
'
stg branch --create br &&
stg new baz -m baz &&
echo baz > baz.txt &&
- stg add baz.txt &&
+ git add baz.txt &&
stg refresh &&
stg branch master &&
stg new baz -m baz &&
echo baz > baz.txt &&
- stg add baz.txt &&
+ git add baz.txt &&
stg refresh
'