annotate-tests: quote variable expansions containing path names
The test case added by 9466e3809d ("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 <j6t@kdbg.org> Acked-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Sixt committed
Jan 30, 2021 at 17:22 UTC
6eaf624dea685f3d61815efeb31d7ff06197330c
1 file changed
+4
-4
t/annotate-tests.sh
+4
-4
@@ -483,12 +483,12 @@ test_expect_success 'setup -L :funcname with userdiff driver' '
483
echo "fortran-* diff=fortran" >.gitattributes &&
484
fortran_file=fortran-external-function &&
485
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" &&
488
GIT_AUTHOR_NAME="A" GIT_AUTHOR_EMAIL="A@test.git" \
489
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" &&
492
GIT_AUTHOR_NAME="B" GIT_AUTHOR_EMAIL="B@test.git" \
493
git commit -m "change fortran file"
494
'