git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/3] Add basic infrastructure to assign attributes to paths

From
Junio C Hamano <junkio@cox.net>
Date
Apr 15, 2007, 00:59 UTC
Message-ID
<7vejmm78qp.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<200704131033.15751.andyparkins@gmail.com>
Andy Parkins <andyparkins@gmail.com> writes:
Show 7 quoted lines
>> 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 <J.Sixt@eudaptics.com> writes:
Show 6 quoted lines
>> 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.

Previous: Andy ParkinsNext: Junio C Hamano
Message 3 of 19 in “Add basic infrastructure to assign attributes to paths”
  1. 1/3 Add basic infrastructure to assign attributes to pathsJunio C Hamano, Apr 13, 2007
  2. Andy ParkinsApr 13, 2007
  3. Junio C HamanoApr 15, 2007
  4. 1/2 attribute macro supportJunio C Hamano, Apr 15, 2007
  5. 2/2 Define a few built-in attribute rules.Junio C Hamano, Apr 15, 2007
  6. Linus TorvaldsApr 15, 2007
  7. Brian GernhardtApr 15, 2007
  8. Junio C HamanoApr 15, 2007
  9. Junio C HamanoApr 15, 2007
  10. Johannes SchindelinApr 15, 2007
  11. Junio C HamanoApr 15, 2007
  12. Linus TorvaldsApr 15, 2007
  13. Fix 'crlf' attribute semantics.Junio C Hamano, Apr 15, 2007
  14. Fix 'diff' attribute semantics.Junio C Hamano, Apr 15, 2007
  15. Tom PrinceApr 15, 2007
  16. Junio C HamanoApr 15, 2007
  17. Raimund BauerApr 16, 2007
  18. Linus TorvaldsApr 13, 2007
  19. Johannes SchindelinApr 15, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.