From 134d11f280cdb8588bb237c0cd0b7244f64046d5 Mon Sep 17 00:00:00 2001 From: yoctocell Date: Mon, 18 Jan 2021 11:48:35 +0100 Subject: Remove functionality for applying patches This is better handled by the piem[0] package. [0]: https://git.kyleam.com/piem --- git-email.el | 41 +---------------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) (limited to 'git-email.el') 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 -- cgit v1.2.3