Git development
 help / color / mirror / Atom feed
From: Avery Pennarun <apenwarr@gmail.com>
To: git@vger.kernel.org
Cc: Avery Pennarun <apenwarr@gmail.com>
Subject: [PATCH 3/3] Update documentation to describe git filter-branch --blob-filter.
Date: Wed, 23 Apr 2008 15:42:37 -0400	[thread overview]
Message-ID: <1208979757-30860-3-git-send-email-apenwarr@gmail.com> (raw)
In-Reply-To: <1208979757-30860-2-git-send-email-apenwarr@gmail.com>

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

  reply	other threads:[~2008-04-23 19:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-23 19:42 [PATCH 1/3] Add --blob-filter option to filter-branch Avery Pennarun
2008-04-23 19:42 ` [PATCH 2/3] Make filter-branch --glob-filter much faster by not calling 'cat' Avery Pennarun
2008-04-23 19:42   ` Avery Pennarun [this message]
2008-04-23 20:05 ` [PATCH 1/3] Add --blob-filter option to filter-branch Johannes Schindelin
2008-04-23 20:12   ` Avery Pennarun
2008-04-23 20:14     ` Johannes Schindelin
2008-04-23 20:18       ` [PATCH 1/3 v2] " Avery Pennarun
2008-04-23 20:22         ` Johannes Schindelin
2008-04-23 21:55         ` Jeff King
2008-04-23 22:07           ` Avery Pennarun
2008-04-24  1:33             ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1208979757-30860-3-git-send-email-apenwarr@gmail.com \
    --to=apenwarr@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox