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 <henrik@lissner.net>
This commit is contained in:
George Xanthakis 2020-10-19 02:17:39 +03:00 committed by GitHub
parent 894d39de3c
commit 4d24d7548a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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?")))