From: Junio C Hamano <hidden> Date: 2016-06-15 22:43:04
Andy Parkins [off-list ref] writes:
quoted
parent directories. Lines in $GIT_DIR/info/attributes file are
used as the lowest precedence default rules.
Shouldn't this be the highest precedence? This would be important for
those cases where I (as a fringe developer) disagree with an attribute
that's been assigned in-tree. I don't want to force my will on every
other developer, but would want my repository to work how I like it.
Johannes Sixt [off-list ref] writes:
quoted
This makes paths with 'nodiff' attribute not to produce
"textual" diffs from 'git-diff' family.
If saying "nodiff" can be made equivalent to "!diff", then I'd strongly
prefer an attribute "diff" over "nodiff". I'm a strong disbeliever in
double negation.
Both of these are good points.
The only reason I initially made it 'nodiff' was to have a pair
of examples to demonstrate positive and negative setting of
attributes, and I agree it makes more sense to say 'diff' in
positive.
I reshuffled the code to make $GIT_DIR/info/attributes the
highest precedence, and unsetting 'diff' attribute to disable
diff; the result is in 'next'.
I'll follow this message up with a few more patches in the
series.
From: Junio C Hamano <hidden> Date: 2016-06-15 22:43:04
This adds an obviously sane pair of default attribute rules as built-ins.
Signed-off-by: Junio C Hamano <redacted>
---
attr.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
This adds an obviously sane pair of default attribute rules as built-ins.
I'm not sure.
+ "[attr]binary !diff !crlf",
+ "* diff crlf",
Why would
* diff crlf
be "obviously sane"?
In fact, I'd call it obviously insane.
We do *not* want to default crlf to all files. We want the default to be
"automatic crlf depending on content".
Then, on top of that, you can *explicitly* specify crlf or !crlf on some
particular filename pattern bases.
(Side thought - I have to concur with whoever suggested "-" instead of
"!". It just reads better, I think)
Linus
From: Brian Gernhardt <hidden> Date: 2016-06-15 22:43:04
On Apr 14, 2007, at 9:41 PM, Linus Torvalds wrote:
(Side thought - I have to concur with whoever suggested "-" instead of
"!". It just reads better, I think)
The "diff" vs "nodiff" argument reminds me of Vim option setting.
Marking a path "diff" means a diff is useful. Marking it "nodiff"
marks it non-useful, same with "crlf" and "nocrlf". Just an idea to
throw out there. It's fairly unambiguous.
~~ Brian G.