aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2025-10-29 16:48:18 +0000
committerMark Johnston <markj@FreeBSD.org>2025-10-29 16:48:18 +0000
commitbe27c64b3a0150534252a66263703283a79c39a0 (patch)
treeb732d6ad510240eca00fa8cfb758674a3bc5143b
parentd617806aac1469319970e3551656e9deabb98a35 (diff)
git-arc: Fix quoting of review titles
This really only matters if a commit title has multiple consecutive spaces, which itself is probably an accident. Reported by: des
-rw-r--r--tools/tools/git/git-arc.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh
index 22df0c61293a..fa618cdcbc22 100644
--- a/tools/tools/git/git-arc.sh
+++ b/tools/tools/git/git-arc.sh
@@ -242,7 +242,7 @@ title2diff()
{
local title
- title=$(echo $1 | sed 's/"/\\"/g')
+ title=$(echo "$1" | sed 's/"/\\"/g')
arc_list --no-ansi |
awk -F': ' '{
if (substr($0, index($0, FS) + length(FS)) == "'"$title"'") {
@@ -470,7 +470,7 @@ gitarc__list()
title=$(git show -s --format=%s "$commit")
diff=$(echo "$openrevs" | \
awk -F'D[1-9][0-9]*: ' \
- '{if ($2 == "'"$(echo $title | sed 's/"/\\"/g')"'") print $0}')
+ '{if ($2 == "'"$(echo "$title" | sed 's/"/\\"/g')"'") print $0}')
if [ -z "$diff" ]; then
echo "No Review : $title"
elif [ "$(echo "$diff" | wc -l)" -ne 1 ]; then