very_good_cli icon indicating copy to clipboard operation
very_good_cli copied to clipboard

feat: Reachable dependency with get-url

Open curt-weber opened this issue 1 year ago • 3 comments

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

  1. Add a rewrite: `git config --global url."[email protected]:ORG/repo.git".insteadOf "[email protected]:ORG/repo.git"
  2. Attempt to pull dependencies: very_good packages get
  3. Notice that it doesn't respect rewrite
  4. Attempt to pull dependencies: flutter pub get
  5. Respects rewrite

Expected Behavior If --get-url is passed the reachable check will resolve similarly to the actual pull

Additional context

curt-weber avatar Aug 02 '24 18:08 curt-weber

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.

alestiago avatar Aug 13 '24 09:08 alestiago

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.

curt-weber avatar Aug 13 '24 15:08 curt-weber

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.

alestiago avatar Aug 14 '24 06:08 alestiago