File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -134,11 +134,18 @@ libraries. It is the equivalent of the following shell commands:
134134 this-rev
135135 new-rev)))
136136 (print! " Link to diff: %s" diff-url)
137- (when (and (not auto-accept-p)
138- (y-or-n-p " View the comparison diff in your browser?" ))
139- (print! (item " Opened github in your browser." ))
140- (browse-url diff-url)))
141-
137+ (if-let* ((gh (executable-find " gh" ))
138+ (cmd (format " %s api repos/doomemacs/doomemacs/compare/%s ...%s "
139+ gh this-rev new-rev)))
140+ (progn
141+ (when-let* ((delta (executable-find " delta" )))
142+ (setq cmd (format " %s | %s --paging=never" cmd delta)))
143+ (print! " Comparison diff: %s" diff-url)
144+ (sh! cmd))
145+ (when (and (not auto-accept-p)
146+ (y-or-n-p " View the comparison diff in your browser?" ))
147+ (print! (item " Opened github in your browser." ))
148+ (browse-url diff-url))))
142149 (if (not (or auto-accept-p
143150 (y-or-n-p " Proceed with upgrade?" )))
144151 (ignore (print! (error " Aborted " )))
You can’t perform that action at this time.
0 commit comments