From fe5b08572ea48e8224bf943b75ac25edc1ffdfad Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sat, 6 Jun 2020 00:17:41 -0400 Subject: Don't pass invalid starting point to 'git checkout' If the caller doesn't enter a base, an empty string is passed as the starting point to 'git checkout', causing it to fail. Instead, map the empty string to nil, resulting in HEAD being used as the starting point. --- piem.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/piem.el b/piem.el index 800fb2c..b7b763f 100644 --- a/piem.el +++ b/piem.el @@ -353,7 +353,8 @@ in `piem-default-branch-function'." (append (if (string-empty-p new-branch) (list "--detach") (list "-b" new-branch)) - (list base)))) + (and (not (string-blank-p base)) + (list base))))) (piem-process-call nil piem-git-executable "am" "--scissors" mbox) (if (and piem-use-magit (fboundp 'magit-status-setup-buffer)) -- cgit v1.2.3