HomePhabricator

Correct the behavior of "bin/repository discover --repair"

Description

Correct the behavior of "bin/repository discover --repair"

Summary:
Ref T13591. Since D8781, this flag does not function correctly in Git and Mercurial repositories, since ref discovery pre-fills the cache.

Move the "don't look at the database" behavior the flag enables into the cache lookup. D8781 should have been slightly more aggressive and done this, it was just overlooked.

Test Plan:

  • Ran bin/repository discover --help and read the updated help text.
  • Ran bin/repository discover --repair in a fully-discovered Git repository.
    • Before: no effect.
    • After: full rediscovery.

Maniphest Tasks: T13591

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