aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--git-email.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/git-email.el b/git-email.el
index e79f486..3837d8b 100644
--- a/git-email.el
+++ b/git-email.el
@@ -273,9 +273,11 @@ If the header is not found, return an empty string."
This runs \“git config --list\" in the current directory
so might not always work."
- (substring
- (shell-command-to-string "git config --list | grep sendemail.to")
- 13 -1)) ; Remove newline
+ (let* ((to (shell-command-to-string "git config --list | grep sendemail.to"))
+ (address (if (string= "" to)
+ ""
+ (substring to 13 -1)))) ; Remove newline
+ address))
(defun git-email--compose-email (patch-file)
"Given a PATCH-FILE, compose an email.