mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Have browse-to-remote default to master in detached repos
Instead of producing links with nil branch.
This commit is contained in:
@ -71,3 +71,12 @@ otherwise in default state."
|
||||
(when (and (bound-and-true-p evil-mode)
|
||||
(bobp) (eolp))
|
||||
(evil-insert-state)))))
|
||||
|
||||
|
||||
;; HACK `browse-at-remote' produces urls with `nil' in them, when the repo
|
||||
;; detached. This creates broken links. I think it is more sensible to at
|
||||
;; least refer to master in those case.
|
||||
(defadvice! +vc--fallback-to-master-branch-a ()
|
||||
"Return 'master' in detached state."
|
||||
:after-until #'browse-at-remote--get-local-branch
|
||||
"master")
|
||||
|
Reference in New Issue
Block a user