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

Re: "man gitattributes" doesn't explain comma-separated attribute values

From
Robert P. J. Day <rpjday@crashcourse.ca>
Date
Mar 16, 2019, 13:48 UTC
Message-ID
<alpine.LFD.2.21.1903160947430.12393@localhost.localdomain>
In-Reply-To
<87r2b79d3p.fsf@evledraar.gmail.com>
On Sat, 16 Mar 2019, Ævar Arnfjörð Bjarmason wrote:
Show 36 quoted lines
>
> On Sat, Mar 16 2019, Robert P. J. Day wrote:
>
> >   more nitpicking, but i'm working my way through the intricacies of
> > attributes and putting together some (allegedly) simple examples for a
> > class i'm giving on monday, and i noted a couple possible shortcomings
> > in "man gitattributes".
> >
> >   as a working example, i looked at the top-level .gitattributes file
> > in the git source code itself, which opens with:
> >
> >   * whitespace=!indent,trail,space
> >   *.[ch] whitespace=indent,trail,space diff=cpp
> >   *.sh whitespace=indent,trail,space eol=lf
> >   ... snip ...
> >
> > first observation is that i see nothing in the man page that explains
> > the notion of a comma-separated list of attribute values. maybe i
> > missed it or maybe it's supposed to be intuitively obvious, but
> > there's nothing i can see that mentions the possibility.
> >
> >   related to that is that there is no explanation as to how to
> > interpret:
> >
> >   * whitespace=!indent,trail,space
> >
> > does the "!" apply to "indent" or to the entire list? the man page
> > doesn't say.
> >
> >   just being pedantic again.
> >
> > rday
>
> It's documented in gitglossary, search for "attr". That's not an excuse
> or a statement that that doesn't suck, just a pointer for anyone
> interested in fixing the docs.
  ah, gotcha. thenk you kindly.
rday
Previous: Ævar Arnfjörð BjarmasonNext: Johannes Sixt
Message 3 of 7 in “"man gitattributes" doesn't explain comma-separated attribute values”
  1. Robert P. J. DayMar 16, 2019
  2. Ævar Arnfjörð BjarmasonMar 16, 2019
  3. Robert P. J. DayMar 16, 2019
  4. Johannes SixtMar 16, 2019
  5. Robert P. J. DayMar 16, 2019
  6. Johannes SixtMar 17, 2019
  7. Philip OakleyMar 18, 2019

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.