Re: [BUG] gitattribute macro expansion oddity
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 10, 2012, 17:22 UTC
- Message-ID
- <7v1ur7bhhe.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20120110070300.GA17086@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Bisection points to ec775c4 (attr: Expand macros immediately when > encountered., 2010-04-06), but it's too late for me to dig further > tonight. Cc'ing Junio as the author of the attr code and Henrik as the > author of ec775c4.
Thanks for getting the ball rolling.
Regardless of this unrelated regression, after looking at what ec775c4 wanted to do again, I am very much tempted to just revert it.
It aimed to take these three
* ident
foo mybin
bar mybin identand wanted to omit 'ident' from "foo" when there is this macro definition elsewhere:
[attr] mybin binary -ident
But the real point of the macro was that the users do not have to know their internals, iow, if you explicitly specify a pattern that overrides the contents of the macro, that explicit pattern should win. When deciding the value of "ident" attribute for path "foo", "* ident" is stronger than "foo mybin" (the latter of which does not say anything about 'ident' explicitly).