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

Rewrite urls with insteadOf option #35

Merged
merged 6 commits into from
Aug 23, 2024

Conversation

david-baylibre
Copy link
Collaborator

The insteadOf option gives the ability to easily rewrite git protocols or even urls.
It can be useful to pull repositories from a mirror.

Copy link
Owner

@makohoek makohoek left a comment

Choose a reason for hiding this comment

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

Some minor remarks, but this looks good already!

repo_resource/common.py Outdated Show resolved Hide resolved
repo_resource/common.py Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
repo_resource/test_check.py Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
repo_resource/test_check.py Outdated Show resolved Hide resolved
repo_resource/common.py Outdated Show resolved Hide resolved
rewrite option is a wrapper to git insteadOf.
First character of a URL can be replaced by something else.

Signed-off-by: David Rozé <[email protected]>
Make use of rewrite option in check and _in steps.

Signed-off-by: David Rozé <[email protected]>
As we add up more methods to the repo class, it becomes convenient to chain methods.
This needs to return the current object in each method.

Signed-off-by: David Rozé <[email protected]>
Rewrite fake url to correct url with rewrite option
to make sure it's effective

Signed-off-by: David Rozé <[email protected]>
rewrite option usage example

Signed-off-by: David Rozé <[email protected]>
@makohoek makohoek self-requested a review August 23, 2024 11:10
@makohoek makohoek merged commit 02c6c9f into makohoek:main Aug 23, 2024
2 checks passed
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