Re: [PATCH v2] refs: use skip_prefix() in ref_is_hidden()

2017-07-24 Thread Jeff King
On Sat, Jul 22, 2017 at 06:39:12AM +0200, Christian Couder wrote: > @@ -1175,10 +1175,9 @@ int ref_is_hidden(const char *refname, const char > *refname_full) > } > > /* refname can be NULL when namespaces are used. */ > - if (!subject ||

[PATCH v2] refs: use skip_prefix() in ref_is_hidden()

2017-07-21 Thread Christian Couder
This is shorter, makes the logic a bit easier to follow, and is perhaps a bit faster too. The logic is to make the final decision only when "subject" is there, its early part matches "match", and the match is at the slash boundary (or the whole thing). Signed-off-by: Christian Couder