From 8a004a98c2cdf4fdbb8f5eaaebc2f89c0919168c Mon Sep 17 00:00:00 2001 From: Robert Wing Date: Mon, 6 Sep 2021 07:42:46 -0800 Subject: [PATCH] git-arc: allow word splitting in build_commit_list() git-rev-list expects commits to be listed separately, allow word splitting and disable shellcheck SC2086 when using git-rev-list to build the commit list. Fixes: 4fd0c6ab1a9e ("Fix most shellcheck warnings in git-arc.sh") Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D31838 --- tools/tools/git/git-arc.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh index 82a549e0868f..0c288e7ac6e2 100644 --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -342,7 +342,8 @@ build_commit_list() for chash in "$@"; do _commits=$(git rev-parse "${chash}") if ! git cat-file -e "${chash}"'^{commit}' >/dev/null 2>&1; then - _commits=$(git rev-list "$_commits" | tail -r) + # shellcheck disable=SC2086 + _commits=$(git rev-list $_commits | tail -r) fi [ -n "$_commits" ] || err "invalid commit ID ${chash}" commits="$commits $_commits"