Page MenuHomePhabricator

In Git, fall back across versions more cleanly when trying to get the URI for a remote

Authored by epriestley on Jan 23 2020, 11:17 PM.



Fixes T13481. When identifying the URI for a remote, fall back from "git remote get-url" to "git ls-remote --get-url" to "git config remote.<name>.url" based on command output and version tests.

Test Plan

Ran arc land --hold, rigged the subcommands to fail to try all three fallbacks, ran arc land --hold --remote asdfasdf to get an explicit failure.

Diff Detail

rARC Arcanist
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Jan 23 2020, 11:17 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jan 23 2020, 11:18 PM
epriestley requested review of this revision.
This revision was automatically updated to reflect the committed changes.