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

[PATCH] Documentation: Mention comment syntax in gitattributes.txt

From
Michal Sojka <sojkam1@fel.cvut.cz>
Date
Dec 3, 2014, 11:11 UTC
Message-ID
<1417605073-8114-1-git-send-email-sojkam1@fel.cvut.cz>

gitattributes documentation does not specify how to include comments in gitattribute files. According to parse_attr_line() in attr.c, # can be used to start a comment. This patch add this to the documentation.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
---
 Documentation/gitattributes.txt | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index c892ffa..0a61a71 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -16,10 +16,16 @@ DESCRIPTION
 A `gitattributes` file is a simple text file that gives
 `attributes` to pathnames.
 
-Each line in `gitattributes` file is of form:
+Lines in `gitattributes` have one of the following forms:
 
+- A blank line can serve as a separator for readability.
+
+- A line starting with # serves as a comment.
+
+- An attribute specification line:
++
 	pattern	attr1 attr2 ...
-
++
 That is, a pattern followed by an attributes list,
 separated by whitespaces.  When the pattern matches the
 path in question, the attributes listed on the line are given to
-- 
2.1.3
Message 1 of 1 in “Documentation: Mention comment syntax in gitattributes.txt”
  1. Documentation: Mention comment syntax in gitattributes.txtMichal Sojka, Dec 3, 2014

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.