From 07c4984508865984fdfdedf2e1cdf86328221af4 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Tue, 17 Oct 2017 09:45:15 +0000 Subject: doc: list filter-branch subdirectory-filter first The docs claim that filters are applied in the listed order, so subdirectory-filter should come first. For consistency, apply the same order to the SYNOPSIS and the script's usage, as well as the switch while parsing arguments. Add missing --prune-empty to the script's usage. Signed-off-by: David Glasser Signed-off-by: Junio C Hamano --- git-filter-branch.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'git-filter-branch.sh') diff --git a/git-filter-branch.sh b/git-filter-branch.sh index 3a74602ef..b7827e745 100755 --- a/git-filter-branch.sh +++ b/git-filter-branch.sh @@ -81,12 +81,12 @@ set_ident () { finish_ident COMMITTER } -USAGE="[--setup ] [--env-filter ] - [--tree-filter ] [--index-filter ] - [--parent-filter ] [--msg-filter ] - [--commit-filter ] [--tag-name-filter ] - [--subdirectory-filter ] [--original ] - [-d ] [-f | --force] +USAGE="[--setup ] [--subdirectory-filter ] + [--env-filter ] [--tree-filter ] + [--index-filter ] [--parent-filter ] + [--msg-filter ] [--commit-filter ] + [--tag-name-filter ] [--prune-empty] + [--original ] [-d ] [-f | --force] [--] [...]" OPTIONS_SPEC= @@ -153,6 +153,10 @@ do --setup) filter_setup="$OPTARG" ;; + --subdirectory-filter) + filter_subdir="$OPTARG" + remap_to_ancestor=t + ;; --env-filter) filter_env="$OPTARG" ;; @@ -174,10 +178,6 @@ do --tag-name-filter) filter_tag_name="$OPTARG" ;; - --subdirectory-filter) - filter_subdir="$OPTARG" - remap_to_ancestor=t - ;; --original) orig_namespace=$(expr "$OPTARG/" : '\(.*[^/]\)/*$')/ ;; -- cgit v1.2.3