From: Jeff King Date: Wed, 12 Oct 2011 04:50:05 GMT Subject: Re: Re* [PATCH v3 19/22] resolve_ref(): emit warnings for improperly-formatted references Message-ID: <20111012045004.GA22413@sigill.intra.peff.net> In-Reply-To: <7v39eyddoc.fsf@alter.siamese.dyndns.org> On Tue, Oct 11, 2011 at 09:41:39PM -0700, Junio C Hamano wrote: > Whether we remove the warning or not, I think it would be an improvement > not to look at random files directly underneath $GIT_DIR/. I am not sure > how we can be confident that we caught everything, though. > > In other words, is shorten-unambiguous-refs the last one that needs > fixing? How would we know for certain? My assumption was that the set of rules is defined by ref_rev_parse_rules, so grepping for functions that access that would be sufficient. It looks like there is also ref_fetch_rules, which serves a similar purpose. Uses of that would also need to be audited. I _think_ that should be enough for arbitrary lookup. I'm sure other callsites directly say things like 'git_path("MERGE_HEAD")', but that's not a problem. They would be doing so with a well-defined top-level refname. This is really just about the ref_rev_parse_rules lookups. -Peff