summaryrefslogtreecommitdiff
path: root/Documentation/git-filter-branch.txt
diff options
context:
space:
mode:
authorAndreas Heiduk <asheiduk@gmail.com>2017-06-10 08:54:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-12 16:44:54 (GMT)
commit3b117f730185ec8acdc8f1b680b9f0a9b647fc0f (patch)
tree75bf64d5d8600a47921cfaa7a3d0bd7abc601c99 /Documentation/git-filter-branch.txt
parent41dd4330a1210003bd702ec4a9301ed68e60864d (diff)
downloadgit-3b117f730185ec8acdc8f1b680b9f0a9b647fc0f.zip
git-3b117f730185ec8acdc8f1b680b9f0a9b647fc0f.tar.gz
git-3b117f730185ec8acdc8f1b680b9f0a9b647fc0f.tar.bz2
filter-branch: add `--setup` step
A `--setup` step in `git filter-branch` makes it much easier to define the initial values of variables used in the real filters. Also sourcing/defining utility functions here instead of `--env-filter` improves performance and minimizes clogging the output in case of errors. Signed-off-by: Andreas Heiduk <asheiduk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-filter-branch.txt')
-rw-r--r--Documentation/git-filter-branch.txt17
1 files changed, 12 insertions, 5 deletions
diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
index 7b695db..9e5169a 100644
--- a/Documentation/git-filter-branch.txt
+++ b/Documentation/git-filter-branch.txt
@@ -8,11 +8,11 @@ git-filter-branch - Rewrite branches
SYNOPSIS
--------
[verse]
-'git filter-branch' [--env-filter <command>] [--tree-filter <command>]
- [--index-filter <command>] [--parent-filter <command>]
- [--msg-filter <command>] [--commit-filter <command>]
- [--tag-name-filter <command>] [--subdirectory-filter <directory>]
- [--prune-empty]
+'git filter-branch' [--setup <command>] [--env-filter <command>]
+ [--tree-filter <command>] [--index-filter <command>]
+ [--parent-filter <command>] [--msg-filter <command>]
+ [--commit-filter <command>] [--tag-name-filter <command>]
+ [--subdirectory-filter <directory>] [--prune-empty]
[--original <namespace>] [-d <directory>] [-f | --force]
[--] [<rev-list options>...]
@@ -82,6 +82,13 @@ multiple commits.
OPTIONS
-------
+--setup <command>::
+ This is not a real filter executed for each commit but a one
+ time setup just before the loop. Therefore no commit-specific
+ variables are defined yet. Functions or variables defined here
+ can be used or modified in the following filter steps except
+ the commit filter, for technical reasons.
+
--env-filter <command>::
This filter may be used if you only need to modify the environment
in which the commit will be performed. Specifically, you might