threads / patch / 38098

patchDocumentation: Mention comment syntax in gitattributes.txt

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

## tl;dr

One message between Dec 3, 2014 and Dec 3, 2014. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Michal Sojka· Dec 3, 2014, 11:11 UTC · lore

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(-)
Show changes to Documentation/gitattributes.txt +8 −2
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

← back to recent threads