From 4d24d7548ad783df1b8baad1199bea70ecafc6c5 Mon Sep 17 00:00:00 2001 From: George Xanthakis Date: Mon, 19 Oct 2020 02:17:39 +0300 Subject: [PATCH] Print diff url in terminal in case emacs is in a remote server (#4105) * Print diff url in terminal in case emacs is in a remote server Closes #2936 * Correct print! call Co-authored-by: Henrik Lissner --- core/cli/upgrade.el | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/core/cli/upgrade.el b/core/cli/upgrade.el index 795ae68f6..6c1fd7fcd 100644 --- a/core/cli/upgrade.el +++ b/core/cli/upgrade.el @@ -99,13 +99,15 @@ following shell commands: (cdr (doom-call-process "git" "log" "-1" "--format=%cr" "HEAD")) (substring new-rev 0 10) (cdr (doom-call-process "git" "log" "-1" "--format=%cr" target-remote)))) - - (when (and (not auto-accept-p) - (y-or-n-p "View the comparison diff in your browser?")) - (print! (info "Opened github in your browser.")) - (browse-url (format "https://github.com/hlissner/doom-emacs/compare/%s...%s" - this-rev - new-rev))) + (let ((diff-url + (format "https://github.com/hlissner/doom-emacs/compare/%s...%s" + this-rev + new-rev))) + (print! "Link to diff: %s" diff-url) + (when (and (not auto-accept-p) + (y-or-n-p "View the comparison diff in your browser?")) + (print! (info "Opened github in your browser.")) + (browse-url diff-url))) (if (not (or auto-accept-p (y-or-n-p "Proceed with upgrade?")))