aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Hållberg <gustav@gmail.com>2012-04-06 21:32:00 +0200
committerGustav Hållberg <gustav@gmail.com>2012-04-06 21:32:00 +0200
commit43f11d852843acde5e0470d28ce98eaa45ee879d (patch)
tree4fa5a6ec6e6af34a4172dce666aee41b1df02a7d
parentc6d48857174bf7a4a84166d07dd231e591d935ad (diff)
downloadstgit-43f11d852843acde5e0470d28ce98eaa45ee879d.tar.gz
stgit.el: Make "\C-u !" run git even when no patches are selected
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
-rw-r--r--contrib/stgit.el13
1 files changed, 6 insertions, 7 deletions
diff --git a/contrib/stgit.el b/contrib/stgit.el
index c71df4b..83ff806 100644
--- a/contrib/stgit.el
+++ b/contrib/stgit.el
@@ -2569,13 +2569,12 @@ When the command has finished, reload the stgit buffer."
(patch-names (mapcar 'symbol-name patches))
(hyphens (find-if (lambda (s) (string-match "^-" s)) patch-names))
(program (if git-mode stgit-git-program stgit-stg-program))
- (defaultcmd (if patches
- (concat program
- " "
- (and hyphens "-- ")
- (mapconcat (if git-mode 'stgit-id 'identity)
- patch-names " "))
- (concat stgit-stg-program " ")))
+ (defaultcmd (concat program
+ " "
+ (and patch-names " ")
+ (and hyphens patch-names "-- ")
+ (mapconcat (if git-mode 'stgit-id 'identity)
+ patch-names " ")))
(cmd (read-from-minibuffer "Shell command: "
(cons defaultcmd (+ (length program) 2))
nil nil 'shell-command-history))