Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally translate Git hosts to web hosts #134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sebastianpoeplau
Copy link

Add an option to translate Git hosts to web hosts in order to support setups where the two are different. For example, Git access could be via "ssh.gitlab.company.com" and the web interface at "gitlab.company.com".

Add an option to translate Git hosts to web hosts in order to support
setups where the two are different. For example, Git access could be via
"ssh.gitlab.company.com" and the web interface at "gitlab.company.com".
@sshaw
Copy link
Owner

sshaw commented Jan 26, 2025

Hi, thanks so much for the PR. I'm surprised this issue has not come up befor. #32 is the closest I could find.

filename (git-link--relative-filename)
branch (git-link--branch)
commit (git-link--commit)
handler (git-link--handler git-link-remote-alist (car remote-info)))
handler (git-link--handler git-link-remote-alist git-host)
web-host (or (assoc-default git-host git-link-web-host-alist) git-host))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use assoc since we're using or to provide a default; or, provide the default to assoc-default. I think the rest of code uses the or pattern so maybe that is a better choice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants