Skip to content
  • Asher Baker's avatar
    Fix arc land on odd/modern git-svn checkouts · 7329bc7c
    Asher Baker authored
    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
    7329bc7c