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

[PATCH] gitattributes: document more clearly where macros are allowed

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Jan 14, 2014, 02:58 UTC
Message-ID
<1389668329-15719-1-git-send-email-mhagger@alum.mit.edu>

The old text made it sound like macros are only allowed in the .gitattributes file at the top-level of the working tree. Make it clear that they are also allowed in $GIT_DIR/info/attributes and in the global and system-wide gitattributes files.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
---
 Documentation/gitattributes.txt | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index b322a26..643c1ba 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -930,9 +930,12 @@ state.
 DEFINING MACRO ATTRIBUTES
 -------------------------
 
-Custom macro attributes can be defined only in the `.gitattributes`
-file at the toplevel (i.e. not in any subdirectory).  The built-in
-macro attribute "binary" is equivalent to:
+Custom macro attributes can be defined only in top-level gitattributes
+files (`$GIT_DIR/info/attributes`, the `.gitattributes` file at the
+top level of the working tree, or the global or system-wide
+gitattributes files), not in `.gitattributes` files in working tree
+subdirectories.  The built-in macro attribute "binary" is equivalent
+to:
 
 ------------
 [attr]binary -diff -merge -text
-- 
1.8.5.2
Message 1 of 1 in “gitattributes: document more clearly where macros are allowed”
  1. gitattributes: document more clearly where macros are allowedMichael Haggerty, Jan 14, 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.