Re: [PATCH v3 19/22] resolve_ref(): emit warnings for improperly-formatted references
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 11, 2011, 17:53 UTC
- Message-ID
- <7vr52jfm8i.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20111011161652.GA15629@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> I wonder if the right solution is for us to be more picky about what can > be found in $GIT_DIR. Maybe matching all-uppercase, or starting with > "refs/", which I think would match existing convention?
I think we've discussed tightening it a few years ago already.
HEAD, MERGE_HEAD, FETCH_HEAD, etc. all are "^[_A-Z]*$" and it may even be a good idea to insist "^[_A-Z]*HEAD$" or even "^([A-Z][A-Z]*_)?HEAD$".