From: Jeff King Date: Sun, 01 Jan 2017 05:59:48 GMT Subject: Re: [PATCH v3 21/23] try_remove_empty_parents(): don't accommodate consecutive slashes Message-ID: <20170101055947.7b5jxih3wlprqcil@sigill.intra.peff.net> In-Reply-To: On Sat, Dec 31, 2016 at 06:30:01PM -0800, Junio C Hamano wrote: > Michael Haggerty writes: > > > "refname" has already been checked by check_refname_format(), so it > > cannot have consecutive slashes. > > In the endgame state, this has two callers. Both use what came in > the transaction->updates[] array. Presumably "has already been > checked by check_refname_format()" says that whoever created entries > in that array must have called the function, but it would be helpful > to be more explicit here. Hmm, yeah. This is called when we are deleting a ref, and I thought we explicitly _didn't_ do check_refname_format() when deleting, so that funny-named refs could be deleted. It's only is_refname_safe() that we must pass. So I have no idea if that's a problem in the code or not, but it is at least not immediately obvious who is responsible for calling check_refname_format() here. -Peff