summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2019-11-06 20:42:28 -0700
committerSean Whitton <spwhitton@spwhitton.name>2019-11-06 20:54:28 -0700
commit9c2a3cafdd25d19d94e53942cf170afd6af635d7 (patch)
treee8e1fe5cd214a865e8de7e43fde6fd9f30347d9d
parent1f2438926be9b6d5365362dc95441956aa453331 (diff)
downloadmailscripts-9c2a3cafdd25d19d94e53942cf170afd6af635d7.tar.gz
Revert "make it possible to suppress prefixing to the branch name"
This reverts commit 3d33e7c0483bb9ab8de3ffd6a0372c8d2a0bffa0. Commit 7360648, which allows the user to suppress branch checkout, is a better way to let the user override their configured mailscripts-extract-patches-branch-prefix. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--mailscripts.el30
1 files changed, 12 insertions, 18 deletions
diff --git a/mailscripts.el b/mailscripts.el
index 43d06d0..1e8cf93 100644
--- a/mailscripts.el
+++ b/mailscripts.el
@@ -54,51 +54,45 @@ If NO-OPEN, don't open the thread."
(notmuch-refresh-this-buffer)))
;;;###autoload
-(defun notmuch-extract-thread-patches (repo branch &optional no-prefix)
+(defun notmuch-extract-thread-patches (repo branch)
"Extract patch series in current thread to branch BRANCH in repo REPO.
-A prefix arg suppresses the effects of
-`mailscripts-extract-patches-branch-prefix'.
-
The target branch may or may not already exist.
See notmuch-extract-patch(1) manpage for limitations: in
particular, this Emacs Lisp function supports passing only entire
threads to the notmuch-extract-patch(1) command."
(interactive
- "Dgit repo: \nsbranch name (or leave blank to apply to current HEAD): \nP")
+ "Dgit repo: \nsbranch name (or leave blank to apply to current HEAD): ")
(let ((thread-id notmuch-show-thread-id)
(default-directory (expand-file-name repo)))
- (mailscripts--check-out-branch branch no-prefix)
+ (mailscripts--check-out-branch branch)
(shell-command
(format "notmuch-extract-patch %s | git am"
(shell-quote-argument thread-id))
"*notmuch-apply-thread-series*")))
;;;###autoload
-(defun notmuch-extract-thread-patches-projectile (&optional no-prefix)
+(defun notmuch-extract-thread-patches-projectile ()
"Like `notmuch-extract-thread-patches', but use projectile to choose the repo."
- (interactive "P")
+ (interactive)
(mailscripts--projectile-repo-and-branch 'notmuch-extract-thread-patches))
;;;###autoload
-(defun notmuch-extract-message-patches (repo branch &optional no-prefix)
+(defun notmuch-extract-message-patches (repo branch)
"Extract patches attached to current message to branch BRANCH in repo REPO.
-A prefix arg suppresses the effects of
-`mailscripts-extract-patches-branch-prefix'.
-
The target branch may or may not already exist.
Patches are applied using git-am(1), so we only consider
attachments with filenames which look like they were generated by
git-format-patch(1)."
(interactive
- "Dgit repo: \nsbranch name (or leave blank to apply to current HEAD): \nP")
+ "Dgit repo: \nsbranch name (or leave blank to apply to current HEAD): ")
(with-current-notmuch-show-message
(let ((default-directory (expand-file-name repo))
(mm-handle (mm-dissect-buffer)))
- (mailscripts--check-out-branch branch no-prefix)
+ (mailscripts--check-out-branch branch)
(notmuch-foreach-mime-part
(lambda (p)
(let* ((disposition (mm-handle-disposition p))
@@ -110,17 +104,17 @@ git-format-patch(1)."
mm-handle))))
;;;###autoload
-(defun notmuch-extract-message-patches-projectile (&optional no-prefix)
+(defun notmuch-extract-message-patches-projectile ()
"Like `notmuch-extract-message-patches', but use projectile to choose the repo."
- (interactive "P")
+ (interactive)
(mailscripts--projectile-repo-and-branch 'notmuch-extract-message-patches))
-(defun mailscripts--check-out-branch (branch no-prefix)
+(defun mailscripts--check-out-branch (branch)
(unless (string= branch "")
(call-process-shell-command
(format "git checkout -b %s"
(shell-quote-argument
- (if (and (not no-prefix) mailscripts-extract-patches-branch-prefix)
+ (if mailscripts-extract-patches-branch-prefix
(concat mailscripts-extract-patches-branch-prefix branch)
branch))))))