]> khamidou — GitHub mirrors - arcanist.git/commit
Use 'remote.origin.url' fallback for git < 1.7.5
authorJavier Arteaga <code@jbeta.is>
Wed, 26 Aug 2015 22:59:03 +0000 (15:59 -0700)
committerepriestley <git@epriestley.com>
Wed, 26 Aug 2015 22:59:03 +0000 (15:59 -0700)
commitc22dfe61ed011892e1f7a304765ba79ca8639b50
treed9abe8cfd203af5a728f500efbaa14e05859eb7b
parent4c3d75401f81636fd19daa9e799fbf54c9586f29
Use 'remote.origin.url' fallback for git < 1.7.5

Summary:
'git ls-remote --get-url' is more correct, but younger and less
supported. This commit tempers previous optimism about its availability,
improving support for users of older git packages.

Test Plan:
* Set `git config url.xttps.insteadOf https` rewrite rule.
* Ran `arc which` with git 1.7.5 in `$PATH`, saw rewritten configured remote.
* Ran `arc which` with git 1.7.4 in `$PATH`, saw configured remote.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13998
src/repository/api/ArcanistGitAPI.php