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

Fix insteadOf for HTTPS catalog repo #12

Merged
merged 1 commit into from
Dec 19, 2024
Merged

Fix insteadOf for HTTPS catalog repo #12

merged 1 commit into from
Dec 19, 2024

Conversation

simu
Copy link
Member

@simu simu commented Dec 18, 2024

We need to configure an additional insteadOf for the ssh://git@ variant of a HTTPS catalog URL since Commodore will optimistically rewrite all HTTPS Git URLs to have their ssh://git@ equivalent as the push URL to make local component development easier.

Fixes #11

Checklist

  • The PR has a meaningful title. It will be used to auto-generate the
    changelog.
    The PR has a meaningful description that sums up the change. It will be
    linked in the changelog.
  • PR contains a single logical change (to build a better changelog).
  • Categorize the PR by adding one of the following labels so it shows up
    in the correct changelog section:
    bug, enhancement, documentation, change, breaking, dependency, internal
  • Link this PR to related issues or PRs.

@simu simu added the bug Something isn't working label Dec 18, 2024
@simu simu force-pushed the fix/https-catalog branch 2 times, most recently from 7605012 to 8f31418 Compare December 18, 2024 15:08
@simu
Copy link
Member Author

simu commented Dec 18, 2024

We can't do this with a pushInsteadOf since Git doesn't honor pushInsteadOf when a remote has an explicit pushurl (and Commodore sets a custom pushurl for all repos it clones): "If a remote has an explicit pushurl, Git will ignore this setting for that remote." (cf. https://git-scm.com/docs/git-config#Documentation/git-config.txt-urlltbasegtpushInsteadOf)

Note that this restriction doesn't apply for "normal" insteadOf.

@simu simu force-pushed the fix/https-catalog branch from 8f31418 to 003a06c Compare December 18, 2024 15:33
@simu simu changed the title Set pushInsteadOf for HTTPS catalog repo Fix insteadOf for HTTPS catalog repo Dec 18, 2024
@simu simu force-pushed the fix/https-catalog branch 2 times, most recently from 18fd648 to 2bca6d6 Compare December 18, 2024 16:03
@simu simu marked this pull request as ready for review December 18, 2024 16:06
@simu simu requested a review from a team December 18, 2024 16:06
We need to configure an additional `insteadOf` for the `ssh://git@`
variant of a HTTPS catalog URL since Commodore will optimistically
rewrite all HTTPS Git URLs to have their `ssh://git@` equivalent as the
push URL to make local component development easier.

We use `git config --add` to set multiple `insteadOf` values for the
same replacement ("base") URL, so that the commands work with older Git
versions.
Copy link
Member

@haasad haasad left a comment

Choose a reason for hiding this comment

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

Aline left, but LGTM

@simu simu merged commit 06004a1 into main Dec 19, 2024
8 checks passed
@simu simu deleted the fix/https-catalog branch December 19, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants