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: 4fd0c6ab1a ("Fix most shellcheck warnings in git-arc.sh")
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D31838
This commit is contained in:
Robert Wing 2021-09-06 07:42:46 -08:00
parent 439aa58728
commit 8a004a98c2

View File

@ -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"