Skip to content

feat: add --get-url flag to git ls-remote for URL config overrides#1642

Open
unicoderbot[bot] wants to merge 2 commits into
mainfrom
vgv-ai-bot/issue-1097
Open

feat: add --get-url flag to git ls-remote for URL config overrides#1642
unicoderbot[bot] wants to merge 2 commits into
mainfrom
vgv-ai-bot/issue-1097

Conversation

@unicoderbot

@unicoderbot unicoderbot Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the --get-url flag to the git ls-remote command in the Git.reachable() method to respect git config URL rewrites (such as url.<base>.insteadOf).

Why

When checking if a git remote is reachable, the CLI was not respecting git config URL overrides like insteadOf. This caused the reachability check to fail for URLs that had been configured with rewrites, while the actual flutter pub get command would succeed because it honors these overrides.

By passing --get-url to git ls-remote, the check now behaves consistently with how the actual dependency pull resolves remotes.

Changes

  • Added --get-url flag to git ls-remote command in Git.reachable()
  • Updated method documentation to explain the flag's purpose
  • Added test case to verify the flag is passed correctly

Closes #1097

Closes #1097

Co-authored-by: marcossevilla <marcossevilla@users.noreply.github.com>
@unicoderbot unicoderbot Bot requested a review from a team as a code owner July 7, 2026 15:39
Comment thread lib/src/cli/git_cli.dart Outdated
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.

feat: Reachable dependency with get-url

1 participant