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

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

From
DD无数 <wushuripple@gmail.com>
Date
Dec 13, 2023, 17:32 UTC
Message-ID
<CAOQ=bxz8txyOt6p5L0qfx5DFKfxUhWvHW0pJP+YTbWVfBpvYxg@mail.gmail.com>
> macos 13.5.2
> git version 2.37.0 (Apple Git-136)

I use end-of-line comments in my .gitattributes file, and it is often (not always present, but often) prompted with '# is not a valid attribute name: .gitattributes:1' when performing many operations.

This is my .gitattributes: ``` res/csv/*.txt eol=lf # 保证csv为lf,以匹配解析格式

# Custom for Visual Studio *.cs diff=csharp ```

When performing certain operations: ···shell

> git status

# is not a valid attribute name: .gitattributes:1 On branch master Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean ···

Other repositories that have .gitattributes files and include end-of-line comments do the same thing. I'm sure there are no special characters in my files.

Next: Junio C Hamano
Message 1 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.