On Mon, May 16, 2016 at 10:03 PM, Junio C Hamano <gits...@pobox.com> wrote:
>
>         int attr_match_nr;
>         int attr_match_alloc;
>         struct attr_match {
>                 struct git_attr *attr;
>                 char *value;
>                 enum attr_match_mode {
>                         ...
>                 } match_mode;
>         } *attr_match;
>         struct git_attr_check *attr_check;

ok, I'll use that structure and go from here.


>
> Then while parsing ":(attr:VAR1=VAL1 -VAR2 VAR3...)path/to/dir/",

This syntax is not pleasant to parse IMHO as it is not clear if the token
after white space (-VAR2 here) is another attribute or the next part of
the list of VAR1, i.e. this could also be:

    :(attr:VAR1=VAL1 VAL2)

I wonder if we'd want to use the colon to separate different VARs:

    :(attr:VAR1=VAL1 VAL2:-VAR2:VAR3)

which means:

   match all path, that
    * have VAR1 set to a value list containing at least
      VAL1 and VAL2
    * have VAR2 unset
    * have VAR3 set to true.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to