aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--git-email.el26
1 files changed, 8 insertions, 18 deletions
diff --git a/git-email.el b/git-email.el
index e3a08e1..ad75a8d 100644
--- a/git-email.el
+++ b/git-email.el
@@ -119,6 +119,12 @@ variable."
:type 'int
:group 'git-email)
+(defcustom git-email-revision-command
+ "git log --no-color --pretty='format:%h %d %d' --abbrev-commit -n "
+ "Command to run to get a list of revisions."
+ :type 'string
+ :group 'git-email)
+
(defface git-email-revision-face '((t :inherit font-lock-comment-face))
"Face used for the revision when selecting from the minibuffer.")
@@ -254,24 +260,9 @@ them into the message buffer."
(revs (butlast (split-string
(shell-command-to-string
(concat
- "git log --no-color --date=short "
- "--pretty='format:%h %d %s'"
- " --abbrev-commit -n "
+ git-email-revision-command
(int-to-string git-email-revision-limit)))
"\n")))
- ;; Colorize
- (colored-revs
- (mapcar (lambda (rev)
- (concat
- (propertize
- (replace-regexp-in-string "\\([a-f0-9]+\\) .*$"
- "\\1" rev)
- 'face 'git-email-revision-face)
- (propertize
- (replace-regexp-in-string "[a-f0-9]+ \\(.*$\\)"
- "\\1" rev)
- 'face 'default)))
- revs))
;; Sort the candidates correctly.
;; See https://emacs.stackexchange.com/a/41808.
(sorted-revs
@@ -280,7 +271,7 @@ them into the message buffer."
'(metadata (display-sort-function . identity)
(cycle-sort-function . identity))
(complete-with-action
- action colored-revs string pred)))))
+ action revs string pred)))))
(substring (completing-read "Revision: " sorted-revs) 0 7)))
;;;###autoload
@@ -313,7 +304,6 @@ arguments in `git-email-format-patch-default-args' will be used."
(git-email--compose-email file)
(run-hooks 'git-email-post-compose-email-hook))))
-
;;;; Operate on emails
(defun git-email-send-all ()
"Send all unsent emails."