Repository navigation
[repo-assist] Fix (redacted) git URL handling to preserve absolute path slash - #4377
Merged
dsyme merged 1 commit intoAug 28, 2026
Merged
Conversation
Closes #1903 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dsyme
marked this pull request as ready for review
August 28, 2026 08:50
This was referenced Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This is an automated response from Repo Assist, an automated AI assistant.
Closes #1903
Root cause
When resolving the commit hash for a local
git (redacted) dependency,RemoteDownload.fsstripped the literal prefix(redacted) (three slashes) from the URL:For a URL like
(redacted) this removes all three slashes, leaving the relative pathtmp/git/a/gitinstead of the intended absolute path/tmp/git/a/git.Directory.Exists/git commands then fail to find the repo relative to the current working directory, producingCould not find hash for master in 'tmp/git/a/git'`.The reporter's workaround was to add an extra slash (
(redacted) which happened to leave one slash behind after stripping — but that's non-standard and not howgit cloneor other URL-aware tools interpret(redacted) URLs.Fix
Strip only the `(redacted) scheme prefix (two slashes), leaving the URL's own leading slash intact so the resulting path is absolute:
Now
(redacted) correctly becomes/tmp/git/a/git/, matching whatgit clone` accepts natively, and the extra-slash workaround is no longer required.Trade-offs
RemoteGitOriginandextractUrlPartsinGitHandling.fsare unchanged).(redacted) URLs are unaffected in the same way (the drive letter still needs its own leading slash stripped per .NET file URI conventions), consistent with existing behavior ofextractUrlParts`.Test Status
dotnet build src/Paket.Core/Paket.Core.fsproj -c Release— succeeded, no new warnings/errors introduced.RemoteDownload.fs's async hash-resolution function, which depends on real git repos/filesystem state rather than being a small pure function likeextractUrlParts). I did not add a new test harness for this, per repo guidance to prefer minimal, surgical changes and reuse existing test patterns; a maintainer may wish to add an integration test scenario with a local `(redacted) git dependency if desired.Add this agentic workflow to your repo
To install this agentic workflow, run