feat: Reachable dependency with get-url
Description
At Git::reachable when checking the ls-remote it doesn't pass --get-url which can be useful with git config overrides (such as insteadOf).
Steps To Reproduce
- Add a rewrite: `git config --global url."[email protected]:ORG/repo.git".insteadOf "[email protected]:ORG/repo.git"
- Attempt to pull dependencies:
very_good packages get - Notice that it doesn't respect rewrite
- Attempt to pull dependencies:
flutter pub get - Respects rewrite
Expected Behavior
If --get-url is passed the reachable check will resolve similarly to the actual pull
Additional context
Hi @curt-weber thanks for this issue!
I haven't tried reproducing it, but it seems that it's a valid request. I've added a reference to the insteadOf documentation to your original issue.
If you're interesting in solving this issue let us know and I can assign this to you! If you have any questions the team might be able to help.
For now this issue requires to be triaged, you might be able to track its status changes within the Full Board.
We use this insteadOf functionality since we have multiple dependencies with different SSH keys and we can configure git to use a specific user for different repositories. I could certainly create a PR adding --get-url, but I imagine it would also need tests etc. and I doubt I would be able to get to it in the near-term if that was the case.
It would require tests, but any contribution is appreciated. Maybe the team is able to pick writing those tests up or another contributor may be able to finish it off; so making a starting draft PR is welcomed!
There's a CONTRIBUTING document that might help getting started.