From 61b22c1c7f5bd547b7030045273c73aef7bdc001 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 28 May 2018 14:26:45 +0200 Subject: [PATCH] doom//upgrade: git reset instead of pull + error handling --- core/core-dispatcher.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/core-dispatcher.el b/core/core-dispatcher.el index 3696c45c2..203c2189f 100644 --- a/core/core-dispatcher.el +++ b/core/core-dispatcher.el @@ -258,9 +258,12 @@ recompile. Run this whenever you: (error "Aborted") (message "Removing byte-compiled files from your config (if any)") (doom//clean-byte-compiled-files) - (unless (zerop (process-file "git" nil buf nil "pull" "--rebase")) + (unless (zerop (process-file "git" nil buf nil "reset" "--hard" + (format "%s/%s" doom-repo-remote branch))) (error "An error occurred while checking out the latest commit\n\n%s" (buffer-string))) + (unless (equal (vc-git-working-revision doom-emacs-dir) rev) + (error "Failed to checkout latest commit.\n\n%s" (buffer-string))) (doom//reload) (message "Done! Please restart Emacs for changes to take effect")))))))))