summaryrefslogtreecommitdiffstats
path: root/gitattributes.txt
diff options
context:
space:
mode:
authorJunio C Hamano <junio@kernel.org>2009-12-17 00:16:20 +0000
committerJunio C Hamano <junio@kernel.org>2009-12-17 00:16:20 +0000
commit6a548ef879912d4cec2e4a1be55b68c23b875f5b (patch)
tree8f2672b2f47c049354da0d62416f8eae08930142 /gitattributes.txt
parent93362779d752f73554b3a0b117fda497b5e64b90 (diff)
downloadgit-htmldocs-6a548ef879912d4cec2e4a1be55b68c23b875f5b.tar.gz
Autogenerated HTML docs for v1.6.6-rc3
Diffstat (limited to 'gitattributes.txt')
-rw-r--r--gitattributes.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/gitattributes.txt b/gitattributes.txt
index 1f472cea5..5a45e5189 100644
--- a/gitattributes.txt
+++ b/gitattributes.txt
@@ -197,6 +197,25 @@ intent is that if someone unsets the filter driver definition,
or does not have the appropriate filter program, the project
should still be usable.
+For example, in .gitattributes, you would assign the `filter`
+attribute for paths.
+
+------------------------
+*.c filter=indent
+------------------------
+
+Then you would define a "filter.indent.clean" and "filter.indent.smudge"
+configuration in your .git/config to specify a pair of commands to
+modify the contents of C programs when the source files are checked
+in ("clean" is run) and checked out (no change is made because the
+command is "cat").
+
+------------------------
+[filter "indent"]
+ clean = indent
+ smudge = cat
+------------------------
+
Interaction between checkin/checkout attributes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^