Bump :emacs vc
rmuslimov/browse-at-remote@aeee6bf -> rmuslimov/browse-at-remote@771a307 Closes #2680
This commit is contained in:
parent
83072d5440
commit
a25dea91d8
5 changed files with 13 additions and 24 deletions
|
@ -238,7 +238,7 @@
|
|||
;;; <leader> v --- versioning
|
||||
(:prefix-map ("v" . "versioning")
|
||||
:desc "Git revert file" "R" #'vc-revert
|
||||
:desc "Kill link to remote" "y" #'+vc/browse-at-remote-kill-file-or-region
|
||||
:desc "Kill link to remote" "y" #'browse-at-remote-kill
|
||||
:desc "Kill link to homepage" "Y" #'+vc/browse-at-remote-kill-homepage
|
||||
(:when (featurep! :ui vc-gutter)
|
||||
:desc "Git revert hunk" "r" #'git-gutter:revert-hunk
|
||||
|
|
|
@ -398,7 +398,7 @@
|
|||
;;; <leader> g --- git/version control
|
||||
(:prefix-map ("g" . "git")
|
||||
:desc "Revert file" "R" #'vc-revert
|
||||
:desc "Copy link to remote" "y" #'+vc/browse-at-remote-kill-file-or-region
|
||||
:desc "Copy link to remote" "y" #'browse-at-remote-kill
|
||||
:desc "Copy link to homepage" "Y" #'+vc/browse-at-remote-kill-homepage
|
||||
(:when (featurep! :ui hydra)
|
||||
:desc "SMerge" "m" #'+vc/smerge-hydra/body)
|
||||
|
|
|
@ -1,19 +1,5 @@
|
|||
;;; emacs/vc/autoload/vc.el -*- lexical-binding: t; -*-
|
||||
|
||||
(autoload 'browse-at-remote-get-url "browse-at-remote")
|
||||
(autoload 'browse-at-remote--file-url "browse-at-remote")
|
||||
|
||||
;;;###autoload
|
||||
(defun +vc/browse-at-remote-kill-file-or-region ()
|
||||
"Copy the current file's remote URL to your clipboard.
|
||||
If a selection is active, highlight them. Otherwise omits the #L<N> suffix in
|
||||
the URL."
|
||||
(interactive)
|
||||
(let ((url (browse-at-remote-get-url)))
|
||||
(kill-new url)
|
||||
(message "Copied to clipboard: %S" url)))
|
||||
|
||||
|
||||
(defun +vc--remote-homepage ()
|
||||
(or (let ((url (browse-at-remote--remote-ref)))
|
||||
(cdr (browse-at-remote--get-url-from-remote (car url))))
|
||||
|
|
|
@ -88,10 +88,13 @@ otherwise in default 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.
|
||||
(after! browse-at-remote
|
||||
(setq browse-at-remote-add-line-number-if-no-region-selected nil)
|
||||
|
||||
;; HACK `browse-at-remote' produces urls with `nil' in them, when the repo is
|
||||
;; detached. This creates broken links. I think it is more sensible to
|
||||
;; fall back to master in those cases.
|
||||
(defadvice! +vc--fallback-to-master-branch-a ()
|
||||
"Return 'master' in detached state."
|
||||
:after-until #'browse-at-remote--get-local-branch
|
||||
"master")
|
||||
"master"))
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
(package! vc-annotate :built-in t)
|
||||
(package! smerge-mode :built-in t)
|
||||
|
||||
(package! browse-at-remote :pin "aeee6bf38f")
|
||||
(package! browse-at-remote :pin "771a3079e2")
|
||||
(package! git-timemachine :pin "391eb61050")
|
||||
(package! gitconfig-mode :pin "55468314a5")
|
||||
(package! gitignore-mode :pin "55468314a5")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue