aboutsummaryrefslogtreecommitdiff
path: root/git-email.el
diff options
context:
space:
mode:
Diffstat (limited to 'git-email.el')
-rw-r--r--git-email.el41
1 files changed, 1 insertions, 40 deletions
diff --git a/git-email.el b/git-email.el
index e0fd6ac..5b72b33 100644
--- a/git-email.el
+++ b/git-email.el
@@ -24,7 +24,7 @@
;;; Commentary:
-;; This package integrates with git and email and offers three main functions
+;; This package integrates with git and email and offers two main functions
;;
;; * `git-email-send-email' sends an email based on a patch file generated by
;; 'git format-patch'. It inserts the relevant headers and the diff into the
@@ -33,11 +33,6 @@
;; * `git-email-format-patch' is a wrapper for 'git format-patch' and it
;; automatically composes an email for each generated patch, in the same way
;; as `git-email-send-email'.
-;;
-;; * `git-email-apply-patch' will apply the patch that you are currently viewing
-;; and it will ask to for the project that the patch belongs to.
-
-;;; TODO:
;;; Code:
@@ -96,20 +91,6 @@ in you git config. If the variable is not set, the 'to' address will be empty."
:type '(string)
:group 'git-email)
-(defcustom git-email-apply-patch-function
- #'git-email--shell-command-on-body
- "Function that executes a shell command on the body of the message.
-This function should take one argument, it should be the shell command to
-execute. By default it is determined by the `git-email-apply-patch-command'
-variable."
- :type 'symbol
- :group 'git-email)
-
-(defcustom git-email-apply-patch-command "git am"
- "Command to run to apply the patch."
- :type 'string
- :group 'git-email)
-
(defcustom git-email-revision-limit 100
"How many revisions to show when in `git-email-format-patch'."
:type 'int
@@ -367,25 +348,5 @@ behavior is to delete them after sending email."
(git-email--compose-email file)
(run-hooks 'git-email-post-compose-email-hook))))
-;;;; Apply patches
-(defun git-email--shell-command-on-body (command)
- "Get the body of the message in the current buffer and run COMMAND on it."
- (shell-command-on-region (point-min) (point-max) command))
-
-(defun git-email--get-project ()
- "Get the path to a project using `project-prompt-project-dir'."
- (let ((project (project-prompt-project-dir)))
- (add-to-list 'project--list (list project))
- project))
-
-;;;###autoload
-(defun git-email-apply-patch (project)
- "Apply the patch in the current buffer using 'git am' in PROJECT."
- (interactive (list (git-email--get-project)))
- (let ((default-directory project))
- (funcall git-email-apply-patch-function
- git-email-apply-patch-command)))
-
-
(provide 'git-email)
;;; git-email.el ends here