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 relative submodule resolution #195

Merged
merged 1 commit into from Oct 30, 2020

Conversation

adracus
Copy link
Contributor

@adracus adracus commented Oct 28, 2020

With the current behavior, the config will always hold the resolved,
absolute URL, leavin the user of go-git no choice to determine whether
the original URL is relative or not.

This changes to employ relative URL resolution only when resolving
a submodule to a repository to keep the correct configuration
'unresolved' and intact.

Change relative resolution using filepath.Dir to path.Join while
parsing both the 'root' and the relative URL with net/url.URL.

Adapt test to verify the new behavior.

Re-fixes #184 (see comments).

With the current behavior, the config will always hold the resolved,
absolute URL, leavin the user of go-git no choice to determine whether
the original URL is relative or not.

This changes to employ relative URL resolution only when resolving
a submodule to a repository to keep the correct configuration
'unresolved' and intact.

Change relative resolution using `filepath.Dir` to `path.Join` while
parsing both the 'root' and the relative URL with `net/url.URL`.

Adapt test to verify the new behavior.

Re-fixes go-git#184 (see comments).
@mcuadros mcuadros merged commit e9c56de into go-git:master Oct 30, 2020
valorl added a commit to valorl/argo-workflows that referenced this pull request Nov 4, 2021
Upgrades src-d/go-git v4 to go-git/go-git v5.3.0.
See go-git/go-git#195.

Signed-off-by: valorl <11498571+valorl@users.noreply.github.com>
terrytangyuan pushed a commit to argoproj/argo-workflows that referenced this pull request Nov 4, 2021
Upgrades src-d/go-git v4 to go-git/go-git v5.3.0.
See go-git/go-git#195.

Signed-off-by: valorl <11498571+valorl@users.noreply.github.com>
sarabala1979 pushed a commit to argoproj/argo-workflows that referenced this pull request Dec 15, 2021
Upgrades src-d/go-git v4 to go-git/go-git v5.3.0.
See go-git/go-git#195.

Signed-off-by: valorl <11498571+valorl@users.noreply.github.com>
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.

None yet

2 participants