summaryrefslogtreecommitdiff
path: root/scripts/maint
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2023-01-10 09:12:20 -0500
committerDavid Goulet <dgoulet@torproject.org>2023-01-10 09:12:20 -0500
commit7e055c383c1204847dcf842ed39fea0e8d8d92d8 (patch)
treeb2fdc192d04bd2fd5469138d10793967cc9112c3 /scripts/maint
parent1e6d839ce9fbd7dfc656bd13a67bd0908863b674 (diff)
parentd456885dac3b5bdfff663ed502fd11f9e0d0e070 (diff)
downloadtor-7e055c383c1204847dcf842ed39fea0e8d8d92d8.tar.gz
tor-7e055c383c1204847dcf842ed39fea0e8d8d92d8.zip
Merge branch 'maint-0.4.7'
Diffstat (limited to 'scripts/maint')
-rwxr-xr-xscripts/maint/code-format.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/maint/code-format.sh b/scripts/maint/code-format.sh
index d8f597d70d..5998e96f68 100755
--- a/scripts/maint/code-format.sh
+++ b/scripts/maint/code-format.sh
@@ -160,11 +160,17 @@ if [[ $GITIDX = 1 ]]; then
# partially staged.
note "Stashing unstaged changes"
git stash -q --keep-index
+ # For some reasons, shellcheck is not seeing that we can call this
+ # function from the trap below.
+ # shellcheck disable=SC2317
function restoregit() {
note "Restoring git state"
git stash pop -q
}
else
+ # For some reasons, shellcheck is not seeing that we can call this
+ # function from the trap below.
+ # shellcheck disable=SC2317
function restoregit() {
true
}