Page MenuHomePhabricator

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

Authored by epriestley on Jan 23 2020, 11:17 PM.
Tags
None
Referenced Files
F13228542: D20950.id.diff
Mon, May 20, 10:18 AM
F13210868: D20950.id49913.diff
Fri, May 17, 5:17 AM
F13210495: D20950.diff
Fri, May 17, 4:55 AM
F13207756: D20950.id49914.diff
Thu, May 16, 3:42 AM
F13196078: D20950.diff
Sun, May 12, 10:55 PM
Unknown Object (File)
Fri, May 3, 2:40 AM
Unknown Object (File)
Thu, May 2, 6:58 PM
Unknown Object (File)
Mon, Apr 29, 2:13 PM
Subscribers
None

Details

Summary

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

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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.