Skip to content

Commit

Permalink
git-arc: allow word splitting in build_commit_list()
Browse files Browse the repository at this point in the history
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: 4fd0c6a ("Fix most shellcheck warnings in git-arc.sh")
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D31838
  • Loading branch information
rob-wing authored and bsdjhb committed Dec 30, 2021
2 parents 6414f74 + 8a004a9 commit c4e7503
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/tools/git/git-arc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c4e7503

Please sign in to comment.