Skip to content

Commit 6eaf624

Browse files
j6tgitster
authored andcommitted
annotate-tests: quote variable expansions containing path names
The test case added by 9466e38 ("blame: enable funcname blaming with userdiff driver", 2020-11-01) forgot to quote variable expansions. This causes failures when the current directory contains blanks. One variable that the test case introduces will not have IFS characters and could remain without quotes, but let's quote all expansions for consistency, not just the one that has the path name. Signed-off-by: Johannes Sixt <[email protected]> Acked-by: Philippe Blain <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3af31e8 commit 6eaf624

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

t/annotate-tests.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -483,12 +483,12 @@ test_expect_success 'setup -L :funcname with userdiff driver' '
483483
echo "fortran-* diff=fortran" >.gitattributes &&
484484
fortran_file=fortran-external-function &&
485485
orig_file="$TEST_DIRECTORY/t4018/$fortran_file" &&
486-
cp $orig_file . &&
487-
git add $fortran_file &&
486+
cp "$orig_file" . &&
487+
git add "$fortran_file" &&
488488
GIT_AUTHOR_NAME="A" GIT_AUTHOR_EMAIL="[email protected]" \
489489
git commit -m "add fortran file" &&
490-
sed -e "s/ChangeMe/IWasChanged/" <"$orig_file" >$fortran_file &&
491-
git add $fortran_file &&
490+
sed -e "s/ChangeMe/IWasChanged/" <"$orig_file" >"$fortran_file" &&
491+
git add "$fortran_file" &&
492492
GIT_AUTHOR_NAME="B" GIT_AUTHOR_EMAIL="[email protected]" \
493493
git commit -m "change fortran file"
494494
'

0 commit comments

Comments
 (0)