From 3b117f730185ec8acdc8f1b680b9f0a9b647fc0f Mon Sep 17 00:00:00 2001 From: Andreas Heiduk Date: Sat, 10 Jun 2017 10:54:44 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- Documentation/git-filter-branch.txt | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'Documentation') diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt index 7b695dbb7..9e5169aa6 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 ] [--tree-filter ] - [--index-filter ] [--parent-filter ] - [--msg-filter ] [--commit-filter ] - [--tag-name-filter ] [--subdirectory-filter ] - [--prune-empty] +'git filter-branch' [--setup ] [--env-filter ] + [--tree-filter ] [--index-filter ] + [--parent-filter ] [--msg-filter ] + [--commit-filter ] [--tag-name-filter ] + [--subdirectory-filter ] [--prune-empty] [--original ] [-d ] [-f | --force] [--] [...] @@ -82,6 +82,13 @@ multiple commits. OPTIONS ------- +--setup :: + 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 :: This filter may be used if you only need to modify the environment in which the commit will be performed. Specifically, you might -- cgit v1.2.1