Have browse-to-remote default to master in detached repos
Instead of producing links with nil branch.
This commit is contained in:
parent
59b57b7eae
commit
f55bcdfd30
1 changed files with 9 additions and 0 deletions
|
@ -71,3 +71,12 @@ otherwise in default state."
|
||||||
(when (and (bound-and-true-p evil-mode)
|
(when (and (bound-and-true-p evil-mode)
|
||||||
(bobp) (eolp))
|
(bobp) (eolp))
|
||||||
(evil-insert-state)))))
|
(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")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue