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.