From: Jeff King <peff@peff.net>
To: "Sérgio Peixoto" <sergio.peixoto@gmail.com>
Cc: Brandon Williams <bwilliams.eng@gmail.com>, git@vger.kernel.org
Subject: Re: Change on check-attr behavior
Date: Fri, 18 Jan 2019 11:58:01 -0500 [thread overview]
Message-ID: <20190118165800.GA9956@sigill.intra.peff.net> (raw)
In-Reply-To: <CAK3b1GJPZ5X3uEP1a-NF9PZkE0tTKVLda5hM32jExVz_OD2E=g@mail.gmail.com>
On Fri, Jan 18, 2019 at 09:41:03AM +0000, Sérgio Peixoto wrote:
> Create a file .git/info/attributes with contents
>
> If the contents are:
> [attr]allowed-ext
> *.py allowed-ext=100
>
> then the problem occurs.
>
> If contents are:
> #[attr]allowed-ext
> *.py allowed-ext=100
>
> the problem is gone
Ah, thanks, that's the secret sauce: it only affects macros.
I don't know how representative that attributes file is of your real
repo, but there's possibly one immediate workaround: there's no need for
the [attr] line here. You are free to define your own attributes, and
only need "[attr]" if you're defining a macro that expands to other
attributes.
Now, on to the actual bug. The simplest reproduction is:
(echo "[attr]foo bar"; echo "* foo") >.gitattributes
git check-attr foo file
which should report "foo" as set. This bisects to 60a12722ac (attr:
remove maybe-real, maybe-macro from git_attr, 2017-01-27), and it seems
like an unintentional regression there. I haven't yet poked into that
commit to see what the fix will look like.
-Peff
next prev parent reply other threads:[~2019-01-18 16:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-17 15:47 Change on check-attr behavior Sérgio Peixoto
2019-01-17 16:07 ` Jeff King
2019-01-18 9:41 ` Sérgio Peixoto
2019-01-18 16:58 ` Jeff King [this message]
2019-01-18 21:34 ` [PATCH] attr: do not mark queried macros as unset Jeff King
2019-01-18 21:46 ` Jeff King
2019-01-18 22:19 ` Stefan Beller
2019-01-22 7:19 ` Jeff King
2019-01-22 9:50 ` Duy Nguyen
2019-01-22 22:00 ` Junio C Hamano
2019-01-21 10:05 ` Duy Nguyen
2019-01-22 7:21 ` Jeff King
2019-01-22 9:34 ` Duy Nguyen
2019-01-22 21:48 ` Junio C Hamano
2019-01-23 5:40 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190118165800.GA9956@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=bwilliams.eng@gmail.com \
--cc=git@vger.kernel.org \
--cc=sergio.peixoto@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).