git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Haggerty <mhagger@alum.mit.edu>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: "git check-attr" lists macros as being "set" -- feature or bug?
Date: Wed, 03 Aug 2011 15:19:39 +0200	[thread overview]
Message-ID: <4E394AEB.7020006@alum.mit.edu> (raw)
In-Reply-To: <7vvcuoq13i.fsf@alter.siamese.dyndns.org>

On 07/26/2011 09:43 PM, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
>> I don't know the original rationale, but it seems like the only sane
>> behavior to me.

I agree that the behavior is sane (and also convenient).

> When we say "check-attr tells you if the named attribute is set", do we
> say "but macros cannot be examined this way" in the documentation?  If
> not, I do not think we need any cluttering update.

I was confused by the following things:

* The word "macro" in other contexts (e.g., C macros) typically refers
to something that is fully replaced by its substitution text, leaving no
trace of the original macro or its name.

* In gitattributes(5), the following misleading text:

> ------------
> *.jpg -text -diff
> ------------
>
> but that may become cumbersome, when you have many attributes.  Using
> attribute macros, you can specify groups of attributes set or unset at
> the same time.  The system knows a built-in attribute macro, `binary`:
>
> ------------
> *.jpg binary
> ------------
>
> which is equivalent to the above.

It is *not* equivalent to the above, rather it is equivalent to

*.jpg binary -text -diff

(neglecting, of course, the recursive expansion of "binary").

I will soon send a documentation patch.

> It is a separate issue if macros should also be listed as the new feature
> that lists all attributes given to a path. I tend to think the macro
> attributes as well as the other attributes they set should all be shown.

I agree.

Michael

-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/

      reply	other threads:[~2011-08-03 13:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=4E394AEB.7020006@alum.mit.edu \
    --to=mhagger@alum.mit.edu \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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).