From: Michael Haggerty <mhagger@alum.mit.edu>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: "git check-attr" lists macros as being "set" -- feature or bug?
Date: Tue, 26 Jul 2011 14:10:11 +0200 [thread overview]
Message-ID: <4E2EAEA3.8000307@alum.mit.edu> (raw)
I am doing some work on git-check-attr, and I noticed something funny:
If a macro is used to set or clear attributes on a file in
.gitattributes, then the name of the macro itself is listed as an
attribute on that file. Example:
$ git init
Initialized empty Git repository in /tmp/foo/.git/
$ echo '[attr]notest !test' > .gitattributes
$ echo 'no notest' >> .gitattributes
# This is expected:
$ git check-attr test -- no
no: test: unspecified
# This I found surprising:
$ git check-attr notest -- no
no: notest: set
I don't see the correct behavior documented anywhere. If this is
considered a bug, then I offer to fix it. If it is considered a
feature, then I offer to document it.
Michael
--
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
next reply other threads:[~2011-07-26 12:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-26 12:10 Michael Haggerty [this message]
2011-07-26 18:47 ` "git check-attr" lists macros as being "set" -- feature or bug? Jeff King
2011-07-26 19:43 ` Junio C Hamano
2011-08-03 13:19 ` Michael Haggerty
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E2EAEA3.8000307@alum.mit.edu \
--to=mhagger@alum.mit.edu \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.
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 NNTP newsgroup(s).