libgit2 / libgit2/libgit2sharp

Cannot fetch a remote which URL is relative

Open
#648 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
3.5k
Forks
925
PR merge metrics
No merged PRs in 30d

Description

I'm using submodules where the origin is specified as a relative URL (like ../../../modules/ModuleA). When trying to fetch from this remote, it fails with Unsupported URL protocol when calling Proxy.git_remote_connect(remoteHandle, GitDirection.Fetch);

I think a fix could be to make the URL absolute based on the repository URL.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at Proxy.git_remote_connect(remoteHandle, GitDirection.Fetch), where the relative submodule remote currently produces an unsupported URL protocol error. Trace how the repository URL and remote URL are handled before this call. Done means fetching from a relative submodule origin resolves it against the repository URL without breaking absolute remotes.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, git
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.