[PATCH 3/3] Update documentation to describe git filter-branch --blob-filter.
Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
---
Documentation/git-filter-branch.txt | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
index 2a78549..367f119 100644
--- a/Documentation/git-filter-branch.txt
+++ b/Documentation/git-filter-branch.txt
@@ -12,6 +12,7 @@ SYNOPSIS
[--index-filter <command>] [--parent-filter <command>]
[--msg-filter <command>] [--commit-filter <command>]
[--tag-name-filter <command>] [--subdirectory-filter <directory>]
+ [--blob-filter <command]
[--original <namespace>] [-d <directory>] [-f | --force]
[<rev-list options>...]
@@ -143,6 +144,15 @@ definition impossible to preserve signatures at any rate.)
The result will contain that directory (and only that) as its
project root.
+--blob-filter <command>::
+ This is the filter for modifying the contents of each file (blob)
+ in the tree. The contents of a file are provided on stdin, and
+ the new file contents should be provided on stdout. For efficiency,
+ the before/after results of a given blob are only calculated once
+ and then cached, so your filter must always return the same output
+ blob for any given input blob. You might use this filter for
+ converting CRLF to LF in all your files, for example.
+
--original <namespace>::
Use this option to set the namespace where the original commits
will be stored. The default value is 'refs/original'.
@@ -185,6 +195,13 @@ git filter-branch --index-filter 'git update-index --remove filename' HEAD
Now, you will get the rewritten history saved in HEAD.
+To convert CRLF to LF in all your files using the "fromdos" program (be
+careful: this will attempt to modify binary files too!):
+
+----------------------------------------------
+git filter-branch --blob-filter 'fromdos' HEAD
+----------------------------------------------
+
To set a commit (which typically is at the tip of another
history) to be the parent of the current initial commit, in
order to paste the other history behind the current history:
--
1.5.4.3