stgit.el: Make ! sort patches when building command line
[stgit] / contrib / stgit.el
index 906a75f..24d4759 100644 (file)
@@ -2462,7 +2462,8 @@ If the command ends in an ampersand, run it asynchronously.
 When the command has finished, reload the stgit buffer."
   (interactive)
   (stgit-assert-mode)
-  (let* ((patches (stgit-patches-marked-or-at-point nil 'allow-committed))
+  (let* ((patches (stgit-sort-patches
+                   (stgit-patches-marked-or-at-point nil 'allow-committed)))
          (patch-names (mapcar 'symbol-name patches))
          (hyphens (find-if (lambda (s) (string-match "^-" s)) patch-names))
          (defaultcmd (if patches