mu4e-actions.el: add mu4e-action-git-apply-mbox example

Apply patch is useful when you might want to change the patch. However
for reviews you may well just want stuff applied directly to the
commit history.
This commit is contained in:
Alex Bennée 2013-10-25 12:09:26 +01:00
parent 64d348c07e
commit c03c14d52d
1 changed files with 13 additions and 0 deletions

View File

@ -180,6 +180,19 @@ store your org-contacts."
(format "cd %s; git apply %s"
path
(mu4e-message-field msg :path)))))
(defun mu4e-action-git-apply-mbox (msg)
"Apply and commit the git [patch] message."
(let ((path (ido-read-directory-name "Target directory: "
(car ido-work-directory-list)
"~/" t)))
(setf ido-work-directory-list
(cons path (delete path ido-work-directory-list)))
(shell-command
(format "cd %s; git am %s"
path
(mu4e-message-field msg :path)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;