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

Add proper custom host support #1095

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

Conversation

raxod502
Copy link
Member

Support for custom entries in straight-hosts was previously a bit limited; there were various places in the code where specific built-in hosts had special cases or were hardcoded. This pull request changes the implementation to be fully generic, so that all features that were previously available for built-in hosts are now also available for custom ones. The way we do this is with a new format for the straight-hosts alist, but the old format is also supported for backwards compatibility (it's automatically translated to the new format if used).

This isn't quite done; I'm going to add a few more unit tests to exercise all the added and changed functionality, and also tweak the interface so that it's possible to configure the browser-friendly URL separately from the Git HTTPS URL.

(let* ((spec (alist-get host straight-hosts))
(domain (car spec))
(suffix (cadr spec)))
;;@FIX: It is sloppy to hardcode the sourcehut case here.
Copy link
Contributor

Choose a reason for hiding this comment

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

Glad to see this hardcoded sourcehut stuff go. Thank you!

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

Successfully merging this pull request may close these issues.

None yet

2 participants