fix(vc): browse to remote from git-timemachine revisions

Use `plist-get` to extract the correct plist values for the "repo-url"
and "remote-type" local variables in order to browse to the correct
remote url from git-timemachine buffers.
This commit is contained in:
Eyoel Tesfu
2025-04-29 00:28:32 -05:00
committed by Henrik Lissner
parent 9c2b2473be
commit 30501abd59

View File

@ -98,8 +98,8 @@ file in your browser at the visited revision."
(file-relative-name
buffer-file-name (expand-file-name (vc-git-root buffer-file-name))))
(target-repo (browse-at-remote--get-url-from-remote remote))
(remote-type (browse-at-remote--get-remote-type target-repo))
(repo-url (cdr target-repo))
(remote-type (browse-at-remote--get-remote-type (plist-get target-repo :unresolved-host)))
(repo-url (plist-get target-repo :url))
(url-formatter (browse-at-remote--get-formatter 'region-url remote-type)))
(unless url-formatter
(error (format "Origin repo parsing failed: %s" repo-url)))