Re: Deleting remote branch pointed by remote HEAD
- From
Jeff King <peff@peff.net>
- Date
- Jan 21, 2009, 19:14 UTC
- Message-ID
- <20090121191408.GA22958@coredump.intra.peff.net>
- In-Reply-To
- <20090121191219.GD21686@coredump.intra.peff.net>
On Wed, Jan 21, 2009 at 02:12:19PM -0500, Jeff King wrote:
Show 9 quoted lines
> > I think it might be more appropriate to just care less about a broken > > symref, explain what's wrong if the user actually tries to use it, and > > otherwise mostly ignore it. > > I thought about that, but I still wonder if deleting it when the > pointed-to ref is deleted might be more convenient. Remember that > "refs/remotes/$foo/HEAD" can be accessed by a shorthand "$foo". So that > means it can impact ref ambiguity lookup. I guess the chance of that > happening is fairly unlikely, though.
Not to mention that even without others refs with matching names, it is probably nicer to the user who does try to access it via "$foo" to simply say "there is no $foo" rather than a confusing error message about a deleted branch that they have to manually fix. And that is easily accomplished by deleting such a bogus symref.
-Peff