X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/dee3cbb2feea6fa7f03d46070b2894fa8a957e3f..7438e0983a0fb852697d7162f6a1812d7ebb0c25:/contrib/stg-swallow diff --git a/contrib/stg-swallow b/contrib/stg-swallow index 5014f39..924c079 100755 --- a/contrib/stg-swallow +++ b/contrib/stg-swallow @@ -15,5 +15,9 @@ patch="$1" stg pick --fold "$patch" stg refresh stg push "$patch" + #stg clean "$patch" -stg pop; stg clean -u +#stg pop; stg clean -u +[ $(stg id "$patch//top") != $(stg id "$patch//bottom") ] || + { echo >&2 "Assertion failed: patch '$patch' is not empty after swallowing, not deleting it."; exit 1; } +stg delete "$patch"