git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* "git check-attr" lists macros as being "set" -- feature or bug?
@ 2011-07-26 12:10 Michael Haggerty
  2011-07-26 18:47 ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Haggerty @ 2011-07-26 12:10 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-03 13:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-26 12:10 "git check-attr" lists macros as being "set" -- feature or bug? Michael Haggerty
2011-07-26 18:47 ` Jeff King
2011-07-26 19:43   ` Junio C Hamano
2011-08-03 13:19     ` Michael Haggerty

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).