Re: [PATCH 4/4] gc: remove broken refs
- From
Jeff King <peff@peff.net>
- Date
- Sep 24, 2015, 17:57 UTC
- Message-ID
- <20150924175758.GB15117@sigill.intra.peff.net>
- In-Reply-To
- <8855bae256311446dffd221ab33c1163eb104c4a.1443085919.git.johannes.schindelin@gmx.de>
On Thu, Sep 24, 2015 at 11:14:02AM +0200, Johannes Schindelin wrote:
> When encountering broken refs, such as a stale remote HEAD (which can > happen if the active branch was renamed in the remote), it is more > helpful to remove those refs than to exit with an error.
For the same reasons as in my earlier responses, I think it's dangerous to remove broken refs (it makes a small corruption much worse). It seems reasonably sane to remove a dangling symref, though if we teach for_each_ref to gracefully skip them, then leaving them in place isn't a problem.
-Peff