HomePhabricator

Avoid parsing git "remote show" using "ls-remote"

Description

Avoid parsing git "remote show" using "ls-remote"

Summary:
Ref T5554. This makes git remote URL detection locale-agnostic.

The previously suggested git config remote.origin.url command does
almost the same, but does not support the URL rewriting features in
git-config (url.<base>.insteadOf).

This one does, although it has the unintuitive behavior of just printing
the passed remote name when the remote does not exist, or even when
called outside a git repo.

Test Plan:

  • Switched to non-english locale in which git has a translation.
  • Ran arc which on the Arcanist repo. It could not determine the remote URI.
  • Applied patch, arc which found the URI.

Reviewers: Blessed Reviewers, epriestley

Reviewed By: Blessed Reviewers, epriestley

Subscribers: johnny-bit, Korvin

Maniphest Tasks: T5554

Differential Revision: https://secure.phabricator.com/D13983

Details

Provenance
jbetaAuthored on
epriestleyCommitted on Aug 24 2015, 11:51 AM
epriestleyPushed on Aug 24 2015, 11:51 AM
Reviewer
Blessed Reviewers
Differential Revision
D13983: Avoid parsing git "remote show" using "ls-remote"
Parents
rARC9b8c9d280ea4: Exclude variables used in strings inside closures when checking for…
Branches
Unknown
Tags
Unknown
Tasks
T5554: arc fails with svn/git/hg non english locales