summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-08-03 21:16:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-08-03 21:16:17 (GMT)
commit6a319e393b856461bab89ffe332a02e71befee40 (patch)
tree730908c3beb0e261b4082db8b83cf11aa8c11b01 /Documentation
parent1b57e56c6191c87b7b372fce3be05f930423780b (diff)
parente9e0643fe64b613b6596b79b59df8ff10746f1a1 (diff)
downloadgit-6a319e393b856461bab89ffe332a02e71befee40.zip
git-6a319e393b856461bab89ffe332a02e71befee40.tar.gz
git-6a319e393b856461bab89ffe332a02e71befee40.tar.bz2
Merge branch 'maint'
* maint: add gitignore entry to description about how to write a builtin gitattributes: Reword "attribute macro" to "macro attribute" gitattributes: Clarify discussion of attribute macros
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/gitattributes.txt25
-rw-r--r--Documentation/technical/api-builtin.txt2
2 files changed, 16 insertions, 11 deletions
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index 412c55b..2bbe76b 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -79,7 +79,7 @@ Attributes for all users on a system should be placed in the
`$(prefix)/etc/gitattributes` file.
Sometimes you would need to override an setting of an attribute
-for a path to `unspecified` state. This can be done by listing
+for a path to `Unspecified` state. This can be done by listing
the name of the attribute prefixed with an exclamation point `!`.
@@ -868,7 +868,7 @@ If this attribute is not set or has an invalid value, the value of the
(See linkgit:git-config[1]).
-USING ATTRIBUTE MACROS
+USING MACRO ATTRIBUTES
----------------------
You do not want any end-of-line conversions applied to, nor textual diffs
@@ -879,24 +879,27 @@ produced for, any binary file you track. You would need to specify e.g.
------------
but that may become cumbersome, when you have many attributes. Using
-attribute macros, you can specify groups of attributes set or unset at
-the same time. The system knows a built-in attribute macro, `binary`:
+macro attributes, you can define an attribute that, when set, also
+sets or unsets a number of other attributes at the same time. The
+system knows a built-in macro attribute, `binary`:
------------
*.jpg binary
------------
-which is equivalent to the above. Note that the attribute macros can only
-be "Set" (see the above example that sets "binary" macro as if it were an
-ordinary attribute --- setting it in turn unsets "text" and "diff").
+Setting the "binary" attribute also unsets the "text" and "diff"
+attributes as above. Note that macro attributes can only be "Set",
+though setting one might have the effect of setting or unsetting other
+attributes or even returning other attributes to the "Unspecified"
+state.
-DEFINING ATTRIBUTE MACROS
+DEFINING MACRO ATTRIBUTES
-------------------------
-Custom attribute macros can be defined only in the `.gitattributes` file
-at the toplevel (i.e. not in any subdirectory). The built-in attribute
-macro "binary" is equivalent to:
+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:
------------
[attr]binary -diff -text
diff --git a/Documentation/technical/api-builtin.txt b/Documentation/technical/api-builtin.txt
index 5cb2b05..b0cafe8 100644
--- a/Documentation/technical/api-builtin.txt
+++ b/Documentation/technical/api-builtin.txt
@@ -49,6 +49,8 @@ Additionally, if `foo` is a new command, there are 3 more things to do:
. Add an entry for `git-foo` to `command-list.txt`.
+. Add an entry for `/git-foo` to `.gitignore`.
+
How a built-in is called
------------------------