diff options
Diffstat (limited to 'git-email.el')
-rw-r--r-- | git-email.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/git-email.el b/git-email.el index 22f4ca9..1897bcd 100644 --- a/git-email.el +++ b/git-email.el @@ -44,6 +44,15 @@ (re-search-forward (format " *%s: +" header)) (point-at-eol)))) +(defun git-email--extract-diff (patch-file) + "Extract the diff from PATCH-FILE." + (with-temp-buffer + (insert-file-contents patch-file) + (goto-char (point-min)) + (buffer-substring-no-properties + (- (re-search-forward "\n\n") 1) + (point-max)))) + (defun git-email-send-email (patch-file) "Given a PATCH-FILE, send an email." (interactive) |