Skip to content

Commit 836b221

Browse files
committed
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 <[email protected]>
1 parent 26ba747 commit 836b221

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

t/t1016-compatObjectFormat.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ commit2_oid () {
7979
}
8080

8181
del_sigcommit () {
82-
local delete=$1
82+
local delete="$1"
8383

8484
if test "$delete" = "sha256" ; then
8585
local pattern="gpgsig-sha256"
@@ -91,8 +91,8 @@ del_sigcommit () {
9191

9292

9393
del_sigtag () {
94-
local storage=$1
95-
local delete=$2
94+
local storage="$1"
95+
local delete="$2"
9696

9797
if test "$storage" = "$delete" ; then
9898
local pattern="trailer"
@@ -181,7 +181,7 @@ done
181181
cd "$base"
182182

183183
compare_oids () {
184-
test "$#" = 5 && { local PREREQ=$1; shift; } || PREREQ=
184+
test "$#" = 5 && { local PREREQ="$1"; shift; } || PREREQ=
185185
local type="$1"
186186
local name="$2"
187187
local sha1_oid="$3"
@@ -193,8 +193,8 @@ compare_oids () {
193193

194194
git --git-dir=repo-sha1/.git rev-parse --output-object-format=sha256 ${sha1_oid} > ${name}_sha1_sha256_found
195195
git --git-dir=repo-sha256/.git rev-parse --output-object-format=sha1 ${sha256_oid} > ${name}_sha256_sha1_found
196-
local sha1_sha256_oid=$(cat ${name}_sha1_sha256_found)
197-
local sha256_sha1_oid=$(cat ${name}_sha256_sha1_found)
196+
local sha1_sha256_oid="$(cat ${name}_sha1_sha256_found)"
197+
local sha256_sha1_oid="$(cat ${name}_sha256_sha1_found)"
198198

199199
test_expect_success $PREREQ "Verify ${type} ${name}'s sha1 oid" '
200200
git --git-dir=repo-sha256/.git rev-parse --output-object-format=sha1 ${sha256_oid} > ${name}_sha1 &&

0 commit comments

Comments
 (0)