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:
parent
894d39de3c
commit
4d24d7548a
1 changed files with 9 additions and 7 deletions
|
@ -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?")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue