sshaw / git-link

Emacs package to get the GitHub/Bitbucket/GitLab/... URL for a buffer location
394 stars 73 forks source link

Tramp support #54

Closed juergenhoetzel closed 6 years ago

juergenhoetzel commented 6 years ago

As already stated in #49, process-lines is not tramp-aware.

Also a Tramp (buffer-file-name) has to be dissected.

sshaw commented 6 years ago

Oh, very nice. Thank you. Give me a day or two to look into and play around with this. 👍

sshaw commented 6 years ago

Also looks like the link is wrong if the buffer being visited via tramp is opened via a symlinked path.

juergenhoetzel commented 6 years ago

Also looks like the link is wrong if the buffer being visited via tramp is opened via a symlinked path.

Good catch: Also handled in the latest commit.

sshaw commented 6 years ago

Hi, thanks.

Calling git-link on tramp dired buffer produces wrong link. Maybe just need to call (file-remote-p file 'localname) here?

Also can you squash this into a single or logical commits?

juergenhoetzel commented 6 years ago

Hi, thanks.

Calling git-link on tramp dired buffer produces wrong link. Maybe just need to call (file-remote-p file 'localname) here?

I came up with a rather simple solution. There is no need to change git-link--relative-filename: It's already Tramp-agnostic.

I just adjusted git-link--repo-root to return tramp file names on remote hosts. In the latest (squashed) commit.