Skip to content

Commit bf7c902

Browse files
Ralf Wildenhuesgitster
authored andcommitted
Improve description of git filter-branch.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent c8a0869 commit bf7c902

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

Documentation/git-filter-branch.txt

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Otherwise, all information (including original commit times or merge
2525
information) will be preserved.
2626

2727
The command will only rewrite the _positive_ refs mentioned in the
28-
command line (i.e. if you pass 'a..b', only 'b' will be rewritten).
28+
command line (e.g. if you pass 'a..b', only 'b' will be rewritten).
2929
If you specify no filters, the commits will be recommitted without any
3030
changes, which would normally have no effect. Nevertheless, this may be
3131
useful in the future for compensating for some git bugs or such,
@@ -42,7 +42,7 @@ Always verify that the rewritten version is correct: The original refs,
4242
if different from the rewritten ones, will be stored in the namespace
4343
'refs/original/'.
4444

45-
Note that since this operation is extensively I/O expensive, it might
45+
Note that since this operation is very I/O expensive, it might
4646
be a good idea to redirect the temporary directory off-disk with the
4747
'-d' option, e.g. on tmpfs. Reportedly the speedup is very noticeable.
4848

@@ -51,14 +51,15 @@ Filters
5151
~~~~~~~
5252

5353
The filters are applied in the order as listed below. The <command>
54-
argument is always evaluated in shell using the 'eval' command (with the
55-
notable exception of the commit filter, for technical reasons).
54+
argument is always evaluated in the shell context using the 'eval' command
55+
(with the notable exception of the commit filter, for technical reasons).
5656
Prior to that, the $GIT_COMMIT environment variable will be set to contain
5757
the id of the commit being rewritten. Also, GIT_AUTHOR_NAME,
5858
GIT_AUTHOR_EMAIL, GIT_AUTHOR_DATE, GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL,
59-
and GIT_COMMITTER_DATE are set according to the current commit. If any
60-
evaluation of <command> returns a non-zero exit status, the whole operation
61-
will be aborted.
59+
and GIT_COMMITTER_DATE are set according to the current commit. The values
60+
of these variables after the filters have run, are used for the new commit.
61+
If any evaluation of <command> returns a non-zero exit status, the whole
62+
operation will be aborted.
6263

6364
A 'map' function is available that takes an "original sha1 id" argument
6465
and outputs a "rewritten sha1 id" if the commit has been already
@@ -71,9 +72,9 @@ OPTIONS
7172
-------
7273

7374
--env-filter <command>::
74-
This is the filter for modifying the environment in which
75-
the commit will be performed. Specifically, you might want
76-
to rewrite the author/committer name/email/time environment
75+
This filter may be used if you only need to modify the environment
76+
in which the commit will be performed. Specifically, you might
77+
want to rewrite the author/committer name/email/time environment
7778
variables (see linkgit:git-commit[1] for details). Do not forget
7879
to re-export the variables.
7980

@@ -149,7 +150,7 @@ definition impossible to preserve signatures at any rate.)
149150
-d <directory>::
150151
Use this option to set the path to the temporary directory used for
151152
rewriting. When applying a tree filter, the command needs to
152-
temporary checkout the tree to some directory, which may consume
153+
temporarily check out the tree to some directory, which may consume
153154
considerable space in case of large projects. By default it
154155
does this in the '.git-rewrite/' directory but you can override
155156
that choice by this parameter.

0 commit comments

Comments
 (0)