From: Daniel Höpfl via GitGitGadget Date: Tue, 15 Jun 2021 19:38:33 GMT Subject: [PATCH] Add config variable besides env variable to squelch "do-not-use" warning. Message-ID: From: =?UTF-8?q?Daniel=20H=C3=B6pfl?= In addition to the environment variable FILTER_BRANCH_SQUELCH_WARNING, the git config filter-branch.squelchWarning is checked to see if the usage warning should be squelched. Signed-off-by: Daniel Höpfl --- Add filter-branch.squelchWarning git config alongside FILTER_BRANCH_SQUELCH_WARNING In addition to the environment variable FILTER_BRANCH_SQUELCH_WARNING, the git config filter-branch.squelchWarning is checked to see if the usage warning should be squelched. Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-912%2Fdhoepfl%2FFILTER_BRANCH_SQUELCH_WARNING-v1 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-912/dhoepfl/FILTER_BRANCH_SQUELCH_WARNING-v1 Pull-Request: https://github.com/git/git/pull/912 git-filter-branch.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/git-filter-branch.sh b/git-filter-branch.sh index fea796461721..d33db14a2a84 100755 --- a/git-filter-branch.sh +++ b/git-filter-branch.sh @@ -83,7 +83,8 @@ set_ident () { finish_ident COMMITTER } -if test -z "$FILTER_BRANCH_SQUELCH_WARNING$GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS" +if test -z "$FILTER_BRANCH_SQUELCH_WARNING$GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS" && + test "$(git config --bool filter-branch.squelchWarning)" != true then cat <