From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 8/6] t1016: local VAR="VAL" fix
Date: Fri, 05 Apr 2024 17:28:16 -0700 [thread overview]
Message-ID: <xmqqil0vs5b3.fsf@gitster.g> (raw)
In-Reply-To: <20240406000902.3082301-1-gitster@pobox.com> (Junio C. Hamano's message of "Fri, 5 Apr 2024 17:08:56 -0700")
The series was based on maint and fixes all the tests that exist
there, but we have acquired a few more.
I suspect that the values assigned in many of these places are $IFS
safe, and this is primarily to squelch the linter than adding a
necessary workaround for buggy dash.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
t/t1016-compatObjectFormat.sh | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git c/t/t1016-compatObjectFormat.sh w/t/t1016-compatObjectFormat.sh
index 8132cd37b8..be3206a16f 100755
--- c/t/t1016-compatObjectFormat.sh
+++ w/t/t1016-compatObjectFormat.sh
@@ -79,7 +79,7 @@ commit2_oid () {
}
del_sigcommit () {
- local delete=$1
+ local delete="$1"
if test "$delete" = "sha256" ; then
local pattern="gpgsig-sha256"
@@ -91,8 +91,8 @@ del_sigcommit () {
del_sigtag () {
- local storage=$1
- local delete=$2
+ local storage="$1"
+ local delete="$2"
if test "$storage" = "$delete" ; then
local pattern="trailer"
@@ -181,7 +181,7 @@ done
cd "$base"
compare_oids () {
- test "$#" = 5 && { local PREREQ=$1; shift; } || PREREQ=
+ test "$#" = 5 && { local PREREQ="$1"; shift; } || PREREQ=
local type="$1"
local name="$2"
local sha1_oid="$3"
@@ -193,8 +193,8 @@ compare_oids () {
git --git-dir=repo-sha1/.git rev-parse --output-object-format=sha256 ${sha1_oid} > ${name}_sha1_sha256_found
git --git-dir=repo-sha256/.git rev-parse --output-object-format=sha1 ${sha256_oid} > ${name}_sha256_sha1_found
- local sha1_sha256_oid=$(cat ${name}_sha1_sha256_found)
- local sha256_sha1_oid=$(cat ${name}_sha256_sha1_found)
+ local sha1_sha256_oid="$(cat ${name}_sha1_sha256_found)"
+ local sha256_sha1_oid="$(cat ${name}_sha256_sha1_found)"
test_expect_success $PREREQ "Verify ${type} ${name}'s sha1 oid" '
git --git-dir=repo-sha256/.git rev-parse --output-object-format=sha1 ${sha256_oid} > ${name}_sha1 &&
prev parent reply other threads:[~2024-04-06 0:28 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-06 0:08 [PATCH 0/6] local VAR="VAL" Junio C Hamano
2024-04-06 0:08 ` [PATCH 1/6] CodingGuidelines: describe "export VAR=VAL" rule Junio C Hamano
2024-04-06 5:11 ` Eric Sunshine
2024-04-06 5:47 ` Junio C Hamano
2024-04-06 9:15 ` Andreas Schwab
2024-04-06 17:03 ` Junio C Hamano
2024-04-06 17:34 ` Eric Sunshine
2024-04-06 0:08 ` [PATCH 2/6] CodingGuidelines: quote assigned value in 'local var=$val' Junio C Hamano
2024-04-06 1:29 ` rsbecker
2024-04-06 2:29 ` Junio C Hamano
2024-04-06 5:16 ` Eric Sunshine
2024-04-06 5:40 ` Junio C Hamano
2024-04-06 0:08 ` [PATCH 3/6] t: local VAR="VAL" (quote positional parameters) Junio C Hamano
2024-04-08 15:30 ` Patrick Steinhardt
2024-04-08 17:23 ` Junio C Hamano
2024-04-06 0:09 ` [PATCH 4/6] t: local VAR="VAL" (quote command substitution) Junio C Hamano
2024-04-06 0:09 ` [PATCH 5/6] t: local VAR="VAL" (quote ${magic-reference}) Junio C Hamano
2024-04-06 0:09 ` [PATCH 6/6] t: teach lint that RHS of 'local VAR=VAL' needs to be quoted Junio C Hamano
2024-04-07 1:43 ` Jeff King
2024-04-08 17:31 ` Junio C Hamano
2024-04-08 20:40 ` Jeff King
2024-04-06 0:23 ` [PATCH 7/6] t0610: local VAR="VAL" fix Junio C Hamano
2024-04-06 0:28 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqil0vs5b3.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=ebiederm@xmission.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).