From: Avery Pennarun Date: Wed, 23 Apr 2008 19:42:37 GMT Subject: [PATCH 3/3] Update documentation to describe git filter-branch --blob-filter. Message-ID: <1208979757-30860-3-git-send-email-apenwarr@gmail.com> In-Reply-To: <1208979757-30860-2-git-send-email-apenwarr@gmail.com> Signed-off-by: Avery Pennarun --- 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 ] [--parent-filter ] [--msg-filter ] [--commit-filter ] [--tag-name-filter ] [--subdirectory-filter ] + [--blob-filter ] [-d ] [-f | --force] [...] @@ -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 :: + 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 :: 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