From e89b604f5f1f1ee2f95ab1713275d5c2301d3cb7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 26 May 2020 02:13:02 -0400 Subject: [PATCH] Fix 'doom upgrade' when doom is a git submodule --- core/cli/upgrade.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/cli/upgrade.el b/core/cli/upgrade.el index 590af2f36..f8067f1df 100644 --- a/core/cli/upgrade.el +++ b/core/cli/upgrade.el @@ -50,7 +50,10 @@ following shell commands: process-file-side-effects) (print! (start "Preparing to upgrade Doom Emacs and its packages...")) - (let* ((branch (vc-git--symbolic-ref doom-emacs-dir)) + (let* ((branch + (string-trim-right + (cdr (doom-call-process "git" "name-rev" "--name-only" "HEAD")) + "~[0-9]$")) (target-remote (format "%s/%s" doom-repo-remote branch))) (unless branch (error! (if (file-exists-p! ".git" doom-emacs-dir)