summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-10-22 18:20:24 +0200
committerThomas Haller <thaller@redhat.com>2018-10-22 18:21:41 +0200
commit301d703bc3ab010c572a2b71af88ed4eff36baaa (patch)
treea7b3e2463b5f4cef06a9344fdbdc3044055e9b47 /contrib
parentf577f719cc35ce1e09e56599ab8af6caa44f728a (diff)
downloadNetworkManager-301d703bc3ab010c572a2b71af88ed4eff36baaa.tar.gz
checkpatch: quote variable in "checkpatch-feature-branch.sh"
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/scripts/checkpatch-feature-branch.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/scripts/checkpatch-feature-branch.sh b/contrib/scripts/checkpatch-feature-branch.sh
index e2fe5b422f..0f37728d9f 100755
--- a/contrib/scripts/checkpatch-feature-branch.sh
+++ b/contrib/scripts/checkpatch-feature-branch.sh
@@ -21,19 +21,19 @@ else
RANGES=( $(git show-ref | sed 's#^\(.*\) '"$BASE_REF"'\(master\|nm-1-[0-9]\+\)$#\1..'"$HEAD"'#p' -n) )
- [ "${#RANGES[@]}" != 0 ] || die "cannot detect git-ranges (HEAD is $(git rev-parse HEAD))"
+ [ "${#RANGES[@]}" != 0 ] || die "cannot detect git-ranges (HEAD is $(git rev-parse "$HEAD"))"
REFS=( $(git log --reverse --format='%H' "${RANGES[@]}") )
if [ "${#REFS[@]}" == 0 ] ; then
# no refs detected. This means, $HEAD is already on master (or one of the
# stable nm-1-* branches. Just check the patch itself.
- REFS=( $HEAD )
+ REFS=( "$HEAD" )
fi
fi
SUCCESS=0
-for H in ${REFS[@]}; do
+for H in "${REFS[@]}"; do
export NM_CHECKPATCH_HEADER=$'\n'">>> VALIDATE \"$(git log --oneline -n1 "$H")\""
git format-patch -U65535 --stdout -1 "$H" | "$BASE_DIR/checkpatch.pl"
if [ $? != 0 ]; then