aboutsummaryrefslogtreecommitdiff
path: root/git-email.el
diff options
context:
space:
mode:
authorXinglu Chen <public@yoctocell.xyz>2021-01-25 10:16:38 +0100
committerXinglu Chen <public@yoctocell.xyz>2021-01-25 10:16:38 +0100
commit3b7f29d64de1c4796b97764adcbabea694a1f2ea (patch)
tree089357d36c31cd69418f754ebd0ef0fc1572cb4f /git-email.el
parent31bed859c05e26d45499269ee947844a33b99329 (diff)
git-email: Don’t assume cwd to be a project
This fixes the problem of trying to send a patch that is not in a version controlled directory. Thank you Protesilaos for pointing this out in id:87wnw2m5zm.fsf@protesilaos.com. * git-email.el (git-email--compose-email): Remove local binding for ‘default-directory’.
Diffstat (limited to 'git-email.el')
-rw-r--r--git-email.el3
1 files changed, 1 insertions, 2 deletions
diff --git a/git-email.el b/git-email.el
index 2aa24fc..9bbad13 100644
--- a/git-email.el
+++ b/git-email.el
@@ -229,8 +229,7 @@ If the header is not found, return an empty string."
"Given a PATCH-FILE, compose an email.
Extracts the relevant headers and the diff from the PATCH-FILE and inserts
them into the message buffer."
- (let* ((default-directory (cdr (project-current)))
- (headers (git-email--extract-headers patch-file))
+ (let* ((headers (git-email--extract-headers patch-file))
;; Remove empty headers.
(used-headers (seq-filter
(lambda (header)