From a68e551b44ce822c96e59b9035f18ff0adbfecc7 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Thu, 15 Mar 2018 14:30:23 +0100 Subject: Rename option names --- README.md | 4 ++-- bin/incremental-git-filterbranch.sh | 30 ++++++++++++------------ test/tests/filter-directory-all-tags.success | 2 +- test/tests/filter-directory-visited-tags.success | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 2da99a2..de5cd10 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ Get the script and read the syntax using the `--help` option. ```sh ./incremental-git-filterbranch.sh \ - --whitelist 'develop master rx:release\/.*' \ - --tags all --tags-max-history-lookup 10 \ + --branch-whitelist 'develop master rx:release\/.*' \ + --tags-plan all --tags-max-history-lookup 10 \ https://github.com/concrete5/concrete5.git \ '--prune-empty --subdirectory-filter concrete' \ git@github.com:concrete5/concrete5-core.git diff --git a/bin/incremental-git-filterbranch.sh b/bin/incremental-git-filterbranch.sh index 3a0e48e..832a4f2 100755 --- a/bin/incremental-git-filterbranch.sh +++ b/bin/incremental-git-filterbranch.sh @@ -30,8 +30,8 @@ usage () { fi printf '%s' "Usage: ${0} [-h | --help] [--workdir ] - [--whitelist ] [--blacklist ] - [--tags (visited|all|none)] + [--branch-whitelist ] [--branch-blacklist ] + [--tags-plan (visited|all|none)] [--tags-max-history-lookup ] [--no-hardlinks] [--no-atomic] [--no-lock] [--] @@ -42,23 +42,23 @@ Where: --workdir workdirpath set the path to the directory where the temporary local repositories are created. By default, we'll use a directory named temp in the current directory. ---whitelist +--branch-whitelist a whitespace-separated list of branches be included in the process. Multiple options can be specified. By default, all branches will be processed. ---tags +--branch-blacklist + a whitespace-separated list of branches to be excluded from the process. + Multiple options can be specified. + By default, all branches will be processed. + Blacklisted branches take the precedence over whitelisted ones. +--tags-plan how tags should be processed. This can be one of these values: visited: process only the tags visited (default) none: do not process any tag all: process all tags --tags-max-history-lookup - limit the depth when looking for best matched filtered commit when --tags is 'all'. + limit the depth when looking for best matched filtered commit when --tags-plan is 'all'. By default this value is 20. ---blacklist - a whitespace-separated list of branches to be excluded from the process. - Multiple options can be specified. - By default, all branches will be processed. - Blacklisted branches take the precedence over whitelisted ones. --no-hardlinks Do not create hard links (useful for file systems that don't support it). --no-atomic @@ -73,7 +73,7 @@ destinationrepository The URL or path to the destination repository. You can prefix branch names in both whitelist and blacklist with 'rx:': in this case a regular expression check will be performed. -For instance: --whitelist 'master rx:release\\/\\d+(\\.\\d+)*' will match 'master' and 'release/1.1' +For instance: --branch-whitelist 'master rx:release\\/\\d+(\\.\\d+)*' will match 'master' and 'release/1.1' " exit 0 } @@ -115,7 +115,7 @@ readParameters () { fi shift 2 ;; - --whitelist) + --branch-whitelist) if test $# -lt 2 then usage 'Not enough arguments' @@ -123,7 +123,7 @@ readParameters () { BRANCH_WHITELIST="${BRANCH_WHITELIST} ${2}" shift 2 ;; - --blacklist) + --branch-blacklist) if test $# -lt 2 then usage 'Not enough arguments' @@ -131,7 +131,7 @@ readParameters () { BRANCH_BLACKLIST="${BRANCH_BLACKLIST} ${2}" shift 2 ;; - --tags) + --tags-plan) if test $# -lt 2 then usage 'Not enough arguments' @@ -147,7 +147,7 @@ readParameters () { PROCESS_TAGS='' ;; *) - usage 'Invalid value of the --tags option' + usage "Invalid value of the ${readParameters_currentArgument} option" ;; esac shift 2 diff --git a/test/tests/filter-directory-all-tags.success b/test/tests/filter-directory-all-tags.success index 1b96830..f9a1017 100755 --- a/test/tests/filter-directory-all-tags.success +++ b/test/tests/filter-directory-all-tags.success @@ -4,7 +4,7 @@ initializeRepositories -"${BIN_MAIN}" --workdir "${DIR_TEMP}" --whitelist 'master' --tags all -- "${DIR_SOURCE}" '--subdirectory-filter subdir' "${DIR_DESTINATION}" +"${BIN_MAIN}" --workdir "${DIR_TEMP}" --branch-whitelist 'master' --tags-plan all -- "${DIR_SOURCE}" '--subdirectory-filter subdir' "${DIR_DESTINATION}" echo 'Fetching tags' actualTags="$(getTagList "${DIR_DESTINATION}")" diff --git a/test/tests/filter-directory-visited-tags.success b/test/tests/filter-directory-visited-tags.success index ea788ed..eec88ee 100755 --- a/test/tests/filter-directory-visited-tags.success +++ b/test/tests/filter-directory-visited-tags.success @@ -4,7 +4,7 @@ initializeRepositories -"${BIN_MAIN}" --workdir "${DIR_TEMP}" --whitelist 'master' -- "${DIR_SOURCE}" '--prune-empty --subdirectory-filter subdir' "${DIR_DESTINATION}" +"${BIN_MAIN}" --workdir "${DIR_TEMP}" --branch-whitelist 'master' -- "${DIR_SOURCE}" '--prune-empty --subdirectory-filter subdir' "${DIR_DESTINATION}" echo 'Fetching tags' actualTags="$(getTagList "${DIR_DESTINATION}")" -- cgit v1.2.3