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

Re: End-of-line comments are prompted with "is not a valid attribute name"

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 17, 2023, 17:15 UTC
Message-ID
<xmqqo7eoiwcb.fsf@gitster.g>
In-Reply-To
<xmqqsf45nbzm.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
> This is totally expected; nothing to see here.

To put it another way, we do not have "end-of-line comment" (i.e. the leading part of a line has payload, but the line is chomped in the middle with a comment character and the remainder of the line is ignored) at all. We have "commented line" (in other words, a line that is totally commented out and gets ignored).

I think it is very clearly documented in "git help attributes":
    A `gitattributes` file is a simple text file that gives
    `attributes` to pathnames.
    Each line in `gitattributes` file is of form:
            pattern attr1 attr2 ...
    That is, a pattern followed by an attributes list,
    separated by whitespaces. Leading and trailing whitespaces are
    ignored. Lines that begin with '#' are ignored. Patterns
    that begin with a double quote are quoted in C style.
Previous: Junio C HamanoNext: D无数
Message 3 of 4 in “End-of-line comments are prompted with "is not a valid attribute name"”
  1. D无数Dec 13, 2023
  2. Junio C HamanoDec 13, 2023
  3. Junio C HamanoDec 17, 2023
  4. D无数Dec 17, 2023

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.