git: 8a004a98c2cd - main - git-arc: allow word splitting in build_commit_list()

Robert Wing rew at FreeBSD.org
Mon Sep 6 15:50:21 UTC 2021


The branch main has been updated by rew:

URL: https://cgit.FreeBSD.org/src/commit/?id=8a004a98c2cdf4fdbb8f5eaaebc2f89c0919168c

commit 8a004a98c2cdf4fdbb8f5eaaebc2f89c0919168c
Author:     Robert Wing <rew at FreeBSD.org>
AuthorDate: 2021-09-06 15:42:46 +0000
Commit:     Robert Wing <rew at FreeBSD.org>
CommitDate: 2021-09-06 15:42:46 +0000

    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"


More information about the dev-commits-src-all mailing list