Re: [PATCH v2] refs: speed up is_refname_available

2014-09-10 Thread Jeff King
On Wed, Sep 10, 2014 at 03:21:39PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > ... > > Reviewed-by: Michael Haggerty > > Signed-off-by: Jeff King > > --- > > Sorry for the quick v2; Michael and I crossed emails off-list, and I > > missed some of his review. This version has some min

Re: [PATCH v2] refs: speed up is_refname_available

2014-09-10 Thread Junio C Hamano
Jeff King writes: > ... > Reviewed-by: Michael Haggerty > Signed-off-by: Jeff King > --- > Sorry for the quick v2; Michael and I crossed emails off-list, and I > missed some of his review. This version has some minor style and comment > fixups. Looks sensible from a cursory read, but it confli

Re: [PATCH v2] refs: speed up is_refname_available

2014-09-10 Thread Junio C Hamano
Jeff King writes: > ... > Reviewed-by: Michael Haggerty > Signed-off-by: Jeff King > --- > Sorry for the quick v2; Michael and I crossed emails off-list, and I > missed some of his review. This version has some minor style and comment > fixups. Looks sensible from a cursory read, but it confli

[PATCH v2] refs: speed up is_refname_available

2014-09-10 Thread Jeff King
Our filesystem ref storage does not allow D/F conflicts; so if "refs/heads/a/b" exists, we do not allow "refs/heads/a" to exist (and vice versa). This falls out naturally for loose refs, where the filesystem enforces the condition. But for packed-refs, we have to make the check ourselves. We do so