On Mon, Sep 17, 2018 at 3:55 AM <smaudet@xxxxxxxxxxxxxxxxxx> wrote: > > The following: > > git add -u :\(glob,attr:-someAttr\):src/** > > Produces an error that, according to the source code, should never be visible to the user. This attribute/pathspec *should* be supported according to the documentation provided by git: > > fatal: BUG:builtin/add.c:498: unsupported magic 40 Brandon, b0db704652 (pathspec: allow querying for attributes - 2017-03-13) added attr support to match_pathspec(), but this add.c manipulates pathspec directly and (I think) does not support 'attr' attribute, which is correctly caught here. I think we need to update the parse_pathspec() call in this file to declare 'attr' not supported. Then we get a friendlier error (or you make this code work too, that's even better). You may want to go through all parse_pathspec() call and make sure that if the pathspec is not consumed only by match_pathspec() then it should reject 'attr', otherwise we'll get this "BUG" again. -- Duy