chiark / gitweb /
replace "git repo-config" usage by "git config"
[stgit] / contrib / stg-swallow
index 5014f39f9deaf7bef0ee6bf35c77483eae5bd8ea..924c079f678afda7b75e6a529d74e1745a7bf499 100755 (executable)
@@ -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"