feat(grfn/home): Add binding for extracting patch from email
Change-Id: Id568f8b479cebe547e1ad8a309ccfa395bf99b83 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5935 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi> Autosubmit: grfn <grfn@gws.fyi>
This commit is contained in:
parent
a37f0eed21
commit
539d69f565
3 changed files with 30 additions and 0 deletions
|
|
@ -40,3 +40,14 @@
|
|||
(eq (car action)
|
||||
'display-buffer-same-window))
|
||||
:ignore t)
|
||||
|
||||
(defun apply-thread-patchset (repo branch)
|
||||
(interactive "Dgit repo: \nsnew branch name: ")
|
||||
(let ((tid notmuch-show-thread-id)
|
||||
(tmp "/tmp/notmuch-patchset"))
|
||||
(shell-command (format "notmuch-extract-patch %s > %s && ( cd %s && git checkout -b %s && git am %s )"
|
||||
(shell-quote-argument tid)
|
||||
(shell-quote-argument tmp)
|
||||
(shell-quote-argument (expand-file-name repo))
|
||||
(shell-quote-argument branch)
|
||||
(shell-quote-argument tmp)))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue