summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorPete Wyckoff <pw@padd.com>2010-12-22 06:40:13 -0800
committerJunio C Hamano <gitster@pobox.com>2010-12-22 10:19:32 -0800
commita2b665de4b694b04959f6371f9887f7ad5cae404 (patch)
tree7b4329b53414d676d14c62cc225a88e7f9136e29 /Documentation
parent853563d7344ee532aa56f8a9aabcfdfb5c4fe2c3 (diff)
downloadgit-a2b665de4b694b04959f6371f9887f7ad5cae404.tar.gz
convert filter: supply path to external driver
Filtering to support keyword expansion may need the name of the file being filtered. In particular, to support p4 keywords like $File: //depot/product/dir/script.sh $ the smudge filter needs to know the name of the file it is smudging. Allow "%f" in the custom filter command line specified in the configuration. This will be substituted by the filename inside a single-quote pair to be passed to the shell. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/gitattributes.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index 5a7f936429..22b85825ab 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -335,6 +335,16 @@ input that is already correctly indented. In this case, the lack of a
smudge filter means that the clean filter _must_ accept its own output
without modifying it.
+Sequence "%f" on the filter command line is replaced with the name of
+the file the filter is working on. A filter might use this in keyword
+substitution. For example:
+
+------------------------
+[filter "p4"]
+ clean = git-p4-filter --clean %f
+ smudge = git-p4-filter --smudge %f
+------------------------
+
Interaction between checkin/checkout attributes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^