HomePhabricator

Fix arc land on odd/modern git-svn checkouts

Description

Fix arc land on odd/modern git-svn checkouts

Summary:
The current code assumes git-svn is always working from a remote called
trunk, but if the repository is initialized without the -T option it
will instead be called git-svn, and if --prefix is used (which is
set by default to origin/ in Git 2+) the remote name will have the
specified prefix as well.

Instead, look at the fetch target refspec set in the git-svn config.

Fixes T13293.

Test Plan:
arc land without errors (or manually creating a trunk branch) from a
checkout made with Git 2.18.0 (verified this manually on a non--T
checkout as well).

Reviewers: epriestley, Blessed Reviewers

Reviewed By: epriestley, Blessed Reviewers

Subscribers: Korvin

Maniphest Tasks: T13293

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