aboutsummaryrefslogtreecommitdiff
path: root/scripts/git
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-04-10 11:49:23 -0400
committerNick Mathewson <nickm@torproject.org>2019-04-10 11:49:23 -0400
commit98e08b452f81316f108113d7ecff15a5e2855d63 (patch)
treedc46f7175e3f0e8ecf1101b518c94b3bab8111e5 /scripts/git
parent3be1e26b8d27b9baa89549fff56fadd2894ec00f (diff)
downloadtor-98e08b452f81316f108113d7ecff15a5e2855d63.tar.gz
tor-98e08b452f81316f108113d7ecff15a5e2855d63.zip
Fix pre-commit hook to correctly allow empty changes files.
Fixes bug 30120; bugfix not in any released Tor.
Diffstat (limited to 'scripts/git')
-rwxr-xr-xscripts/git/pre-commit.git-hook4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/git/pre-commit.git-hook b/scripts/git/pre-commit.git-hook
index 65fa99f4c4..4a962851b0 100755
--- a/scripts/git/pre-commit.git-hook
+++ b/scripts/git/pre-commit.git-hook
@@ -12,7 +12,7 @@ cd "$workdir" || exit 1
set -e
-if [ ! -z "ls ./changes/*" ]; then
+if [ -n "$(ls ./changes/)" ]; then
python scripts/maint/lintChanges.py ./changes/*
fi
@@ -26,7 +26,7 @@ if [ -d src/lib ]; then
src/test/*.[ch] \
src/test/*/*.[ch] \
src/tools/*.[ch]
-elif [ -d src/common]; then
+elif [ -d src/common ]; then
# This was the layout before 0.3.5
perl scripts/maint/checkSpace.pl -C \
src/common/*/*.[ch] \