aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-04-05 17:28:16 -0700
committerJunio C Hamano <gitster@pobox.com>2024-04-05 22:50:11 -0700
commit836b22139115f92812479ff6a92ffad09f8a6b8c (patch)
tree96eaaba5ff2aa6b2a9313ebe2df638ca01658e1b
parent26ba7477d9815f82ad37c5a5499af2e236cbef25 (diff)
downloadgit-836b22139115f92812479ff6a92ffad09f8a6b8c.tar.gz
t1016: local VAR="VAL" fix
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>
-rwxr-xr-xt/t1016-compatObjectFormat.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/t1016-compatObjectFormat.sh b/t/t1016-compatObjectFormat.sh
index 8132cd37b8..be3206a16f 100755
--- a/t/t1016-compatObjectFormat.sh
+++ b/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 &&