aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Locati <michele@locati.it>2018-03-15 14:30:23 +0100
committerMichele Locati <michele@locati.it>2018-03-15 14:30:23 +0100
commita68e551b44ce822c96e59b9035f18ff0adbfecc7 (patch)
treedab1dd81f34e598f9d63eb344ba2f2e4433506a7
parent2f5505bcbb4c32811a18863c6102bbb552dcc6c7 (diff)
downloadincremental-git-filter-branch-a68e551b44ce822c96e59b9035f18ff0adbfecc7.tar.gz
incremental-git-filter-branch-a68e551b44ce822c96e59b9035f18ff0adbfecc7.tar.bz2
incremental-git-filter-branch-a68e551b44ce822c96e59b9035f18ff0adbfecc7.zip
Rename option names
-rw-r--r--README.md4
-rwxr-xr-xbin/incremental-git-filterbranch.sh30
-rwxr-xr-xtest/tests/filter-directory-all-tags.success2
-rwxr-xr-xtest/tests/filter-directory-visited-tags.success2
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 <workdirpath>]
- [--whitelist <whitelist>] [--blacklist <blacklist>]
- [--tags (visited|all|none)]
+ [--branch-whitelist <whitelist>] [--branch-blacklist <blacklist>]
+ [--tags-plan (visited|all|none)]
[--tags-max-history-lookup <depth>]
[--no-hardlinks] [--no-atomic] [--no-lock] [--]
<sourcerepository> <filter> <destinationrepository>
@@ -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 <whitelist>
+--branch-whitelist <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 <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 <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}")"

© 2014-2024 Faster IT GmbH | imprint | privacy policy