+
+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_expect_success 'Uncommit a commit with not precisely one parent' '
+ command_error stg uncommit -n 5 &&
+ [ "$(echo $(stg series))" = "" ]
+'
+