Page MenuHomePhabricator

`arc land` can raise misleading error message if a branch exists in the remote but has never been fetched
Closed, ResolvedPublic

Description

In ArcanistGitLandEngine::verifySourceAndTargetExist() we run something like git rev-parse origin/master to check if the target branch exists in the origin.

If rev-parse fails, we emit this message:

'Branch "%s" does not exist in remote "%s".',

However, it may exist but never have been fetched, so this message is misleading. It should do something like:

  • be more specific that the branch does not exist locally and suggest a remedy (git fetch ...); or
  • fall back to git ls-remote and verify that it really doesn't exist in the remote.

Revisions and Commits

Restricted Differential Revision

Event Timeline

eadler added a project: Restricted Project.Jun 17 2016, 6:55 AM
eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Jun 17 2016, 7:09 AM
eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Jul 4 2016, 9:19 PM
epriestley added a revision: Restricted Differential Revision.Oct 28 2019, 6:20 PM
epriestley closed this task as Resolved by committing Restricted Diffusion Commit.Oct 28 2019, 6:31 PM
epriestley claimed this task.
epriestley added a commit: Restricted Diffusion Commit.