stgit.el: Make "C-u r" raise error if run with prefix argument without a patch
[stgit] / contrib / stg-dispatch
index e9cfb05..e98d91b 100755 (executable)
@@ -26,7 +26,7 @@ fi
 TOPATCH="$1"
 shift
 
-stg applied | grep "^$TOPATCH\$" >/dev/null ||
+stg series --applied --noprefix | grep "^$TOPATCH\$" >/dev/null ||
     die "cannot dispatch to unapplied patch '$TOPATCH'"
 
 CURRENTPATCH=$(stg top)