diff options
author | yoctocell <public@yoctocell.xyz> | 2021-01-10 15:32:38 +0100 |
---|---|---|
committer | yoctocell <public@yoctocell.xyz> | 2021-01-10 15:32:38 +0100 |
commit | a4b69510998bfa0e082f45dddb17de36b55bf03a (patch) | |
tree | b6923d0d57e6743520af94f602a6502fdab23ad2 /git-email.el | |
parent | a684c0d9364664677da467c883934731e9136935 (diff) |
Ask for version number for git format-patch
Explicitly ask for the version number (-v option) if
`git-email-format-patch' has been called the a prefix argument.
* git-email.el (git-email--compose-email):
(git-email-format-patch):
Diffstat (limited to 'git-email.el')
-rw-r--r-- | git-email.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/git-email.el b/git-email.el index 7721d09..da48303 100644 --- a/git-email.el +++ b/git-email.el @@ -259,7 +259,7 @@ them into the message buffer." (sendemail-to (shell-command-to-string "git config --list | grep sendemail.to")) (to (if (string-equal sendemail-to "") - "to" + "" (substring sendemail-to 13 -1))) ; Remove newline (diff (git-email--extract-diff patch-file))) (funcall git-email-compose-email-function to @@ -323,21 +323,24 @@ behavior is to delete them after sending email." (funcall fn)) git-email-get-revision-functions) (git-email--minibuffer-get-revision))) - ;; Extra arguments. + (version (if args + (read-from-minibuffer "Version: " "2") + "1")) (args (if args (apply #'concat (mapcar (lambda (a) (concat a " ")) - (list (completing-read-multiple - "Args: " - git-email-format-patch-extra-args)))) + (completing-read-multiple + "Args: " + git-email-format-patch-extra-args))) git-email-format-patch-default-args)) ;; List of patches generated, the last element is an empty string ;; so remove it. Reverse the list so we edit the cover letter first. (files (nreverse (butlast (split-string (shell-command-to-string - (concat "git format-patch " args " " rev)) + (format "git format-patch %s -v %s %s" + args version rev)) "\n"))))) (dolist (file files) (run-hooks 'git-email-pre-compose-email-hook) |