summaryrefslogtreecommitdiff
path: root/git-filter-branch.sh
diff options
context:
space:
mode:
authorDavid Glasser <glasser@davidglasser.net>2017-10-17 09:45:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-10-18 00:10:15 (GMT)
commit07c4984508865984fdfdedf2e1cdf86328221af4 (patch)
tree30ec28a2b50879a665819d1506352100274a0b24 /git-filter-branch.sh
parent4010f1d1b782eb7585e0e0abcefa794bd5ff29a0 (diff)
downloadgit-07c4984508865984fdfdedf2e1cdf86328221af4.zip
git-07c4984508865984fdfdedf2e1cdf86328221af4.tar.gz
git-07c4984508865984fdfdedf2e1cdf86328221af4.tar.bz2
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 <glasser@davidglasser.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-filter-branch.sh')
-rwxr-xr-xgit-filter-branch.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 3a74602..b7827e7 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -81,12 +81,12 @@ set_ident () {
finish_ident COMMITTER
}
-USAGE="[--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>] [--original <namespace>]
- [-d <directory>] [-f | --force]
+USAGE="[--setup <command>] [--subdirectory-filter <directory>]
+ [--env-filter <command>] [--tree-filter <command>]
+ [--index-filter <command>] [--parent-filter <command>]
+ [--msg-filter <command>] [--commit-filter <command>]
+ [--tag-name-filter <command>] [--prune-empty]
+ [--original <namespace>] [-d <directory>] [-f | --force]
[--] [<rev-list options>...]"
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/" : '\(.*[^/]\)/*$')/
;;