diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh index 093832fef1..a669f62beb 100644 --- a/t/annotate-tests.sh +++ b/t/annotate-tests.sh @@ -274,27 +274,27 @@ test_expect_success 'blame -L X,-N' ' ' test_expect_success 'blame -L /RE/ (RE to end)' ' - check_count -L/evil/ C 1 "A U Thor" 1 + check_count -L/\;*evil/ C 1 "A U Thor" 1 ' test_expect_success 'blame -L /RE/,/RE2/' ' - check_count -L/robot/,/green/ A 1 B 1 B2 1 D 1 E 1 + check_count -L/\;*robot/,/\;*green/ A 1 B 1 B2 1 D 1 E 1 ' test_expect_success 'blame -L X,/RE/' ' - check_count -L5,/evil/ B1 1 D 1 "A U Thor" 1 + check_count -L5,/\;*evil/ B1 1 D 1 "A U Thor" 1 ' test_expect_success 'blame -L /RE/,Y' ' - check_count -L/99/,7 B1 1 D 1 "A U Thor" 1 + check_count -L/\;*99/,7 B1 1 D 1 "A U Thor" 1 ' test_expect_success 'blame -L /RE/,+N' ' - check_count -L/99/,+3 B1 1 D 1 "A U Thor" 1 + check_count -L/\;*99/,+3 B1 1 D 1 "A U Thor" 1 ' test_expect_success 'blame -L /RE/,-N' ' - check_count -L/99/,-3 B 1 B2 1 D 1 + check_count -L/\;*99/,-3 B 1 B2 1 D 1 ' # 'file' ends with an incomplete line, so 'wc' reports one fewer lines than @@ -360,19 +360,19 @@ test_expect_success 'blame -L multiple (superset/subset: unordered)' ' ' test_expect_success 'blame -L /RE/ (relative)' ' - check_count -L3,3 -L/fox/ B1 1 B2 1 C 1 D 1 "A U Thor" 1 + check_count -L3,3 -L/\;*fox/ B1 1 B2 1 C 1 D 1 "A U Thor" 1 ' test_expect_success 'blame -L /RE/ (relative: no preceding range)' ' - check_count -L/dog/ A 1 B 1 B1 1 B2 1 C 1 D 1 "A U Thor" 1 + check_count -L/\;*dog/ A 1 B 1 B1 1 B2 1 C 1 D 1 "A U Thor" 1 ' test_expect_success 'blame -L /RE/ (relative: adjacent)' ' - check_count -L1,1 -L/dog/,+1 A 1 E 1 + check_count -L1,1 -L/\;*dog/,+1 A 1 E 1 ' test_expect_success 'blame -L /RE/ (relative: not found)' ' - test_must_fail $PROG -L4,4 -L/dog/ file + test_must_fail $PROG -L4,4 -L/\;*dog/ file ' test_expect_success 'blame -L /RE/ (relative: end-of-file)' ' @@ -380,11 +380,11 @@ test_expect_success 'blame -L /RE/ (relative: end-of-file)' ' ' test_expect_success 'blame -L ^/RE/ (absolute)' ' - check_count -L3,3 -L^/dog/,+2 A 1 B2 1 + check_count -L3,3 -L^/\;*dog/,+2 A 1 B2 1 ' test_expect_success 'blame -L ^/RE/ (absolute: no preceding range)' ' - check_count -L^/dog/,+2 A 1 B2 1 + check_count -L^/\;*dog/,+2 A 1 B2 1 ' test_expect_success 'blame -L ^/RE/ (absolute: not found)' ' diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh index 7bac2bcf26..35a0e5c4aa 100755 --- a/t/t0021-conversion.sh +++ b/t/t0021-conversion.sh @@ -214,7 +214,7 @@ test_expect_success 'filter that does not read is fine' ' test_cmp expect actual ' -test_expect_success EXPENSIVE 'filter large file' ' +test_expect_success EXPENSIVE,!MINGW 'filter large file' ' git config filter.largefile.smudge cat && git config filter.largefile.clean cat && for i in $(test_seq 1 2048); do printf "%1048576d" 1; done >2GB && diff --git a/t/t0027-auto-crlf.sh b/t/t0027-auto-crlf.sh index f33962b178..415c63556e 100755 --- a/t/t0027-auto-crlf.sh +++ b/t/t0027-auto-crlf.sh @@ -4,9 +4,9 @@ test_description='CRLF conversion all combinations' . ./test-lib.sh -if ! test_have_prereq EXPENSIVE +if ! test_have_prereq EXPENSIVE && ! test_have_prereq MINGW then - skip_all="EXPENSIVE not set" + skip_all="Neither EXPENSIVE nor MINGW set" test_done fi diff --git a/t/t0302-credential-store.sh b/t/t0302-credential-store.sh index 1d8d1f210b..d6b54e8c65 100755 --- a/t/t0302-credential-store.sh +++ b/t/t0302-credential-store.sh @@ -37,7 +37,7 @@ helper_test store unset XDG_CONFIG_HOME test_expect_success 'if custom xdg file exists, home and xdg files not created' ' - test_when_finished "rm -f $HOME/xdg/git/credentials" && + test_when_finished "rm -f \"$HOME/xdg/git/credentials\"" && test -s "$HOME/xdg/git/credentials" && test_path_is_missing "$HOME/.git-credentials" && test_path_is_missing "$HOME/.config/git/credentials" diff --git a/t/t1501-work-tree.sh b/t/t1501-work-tree.sh index cc5b870e58..afce274133 100755 --- a/t/t1501-work-tree.sh +++ b/t/t1501-work-tree.sh @@ -339,6 +339,10 @@ test_expect_success 'make_relative_path handles double slashes in GIT_DIR' ' git --git-dir="$(pwd)//repo.git" --work-tree="$(pwd)" add dummy_file ' +test_have_prereq MINGW && +# make sure to test DOS path on Windows +TRASH_DIRECTORY="$(cd "$TRASH_DIRECTORY" && pwd)" + test_expect_success 'relative $GIT_WORK_TREE and git subprocesses' ' GIT_DIR=repo.git GIT_WORK_TREE=repo.git/work \ test-subprocess --setup-work-tree rev-parse --show-toplevel >actual && diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index 544f9ad508..11dde66010 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -62,7 +62,7 @@ test_expect_success 'setup' ' # "exec" commands are ran with the user shell by default, but this may # be non-POSIX. For example, if SHELL=zsh then ">file" doesn't work -# to create a file. Unseting SHELL avoids such non-portable behavior +# to create a file. Unsetting SHELL avoids such non-portable behavior # in tests. It must be exported for it to take effect where needed. SHELL= export SHELL diff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh index 4bf1dbe9c9..4b62fa79b1 100755 --- a/t/t3900-i18n-commit.sh +++ b/t/t3900-i18n-commit.sh @@ -40,7 +40,7 @@ test_expect_success 'UTF-16 refused because of NULs' ' ' test_expect_success 'UTF-8 invalid characters refused' ' - test_when_finished "rm -f $HOME/stderr $HOME/invalid" && + test_when_finished "rm -f \"$HOME/stderr $HOME/invalid\"" && echo "UTF-8 characters" >F && printf "Commit message\n\nInvalid surrogate:\355\240\200\n" \ >"$HOME/invalid" && @@ -49,7 +49,7 @@ test_expect_success 'UTF-8 invalid characters refused' ' ' test_expect_success 'UTF-8 overlong sequences rejected' ' - test_when_finished "rm -f $HOME/stderr $HOME/invalid" && + test_when_finished "rm -f \"$HOME/stderr $HOME/invalid\"" && rm -f "$HOME/stderr" "$HOME/invalid" && echo "UTF-8 overlong" >F && printf "\340\202\251ommit message\n\nThis is not a space:\300\240\n" \ @@ -59,7 +59,7 @@ test_expect_success 'UTF-8 overlong sequences rejected' ' ' test_expect_success 'UTF-8 non-characters refused' ' - test_when_finished "rm -f $HOME/stderr $HOME/invalid" && + test_when_finished "rm -f \"$HOME/stderr $HOME/invalid\"" && echo "UTF-8 non-character 1" >F && printf "Commit message\n\nNon-character:\364\217\277\276\n" \ >"$HOME/invalid" && @@ -68,7 +68,7 @@ test_expect_success 'UTF-8 non-characters refused' ' ' test_expect_success 'UTF-8 non-characters refused' ' - test_when_finished "rm -f $HOME/stderr $HOME/invalid" && + test_when_finished "rm -f \"$HOME/stderr $HOME/invalid\"" && echo "UTF-8 non-character 2." >F && printf "Commit message\n\nNon-character:\357\267\220\n" \ >"$HOME/invalid" && diff --git a/t/t5503-tagfollow.sh b/t/t5503-tagfollow.sh index 4ca48f0276..d2b86594ff 100755 --- a/t/t5503-tagfollow.sh +++ b/t/t5503-tagfollow.sh @@ -52,7 +52,7 @@ get_needs () { ' "$1" } -test_expect_success 'fetch A (new commit : 1 connection)' ' +test_expect_failure 'fetch A (new commit : 1 connection)' ' # TODO known breakage rm -f $U && ( cd cloned && @@ -82,7 +82,7 @@ want $T EOF ' -test_expect_success 'fetch C, T (new branch, tag : 1 connection)' ' +test_expect_failure 'fetch C, T (new branch, tag : 1 connection)' ' # TODO known breakage rm -f $U && ( cd cloned && @@ -118,7 +118,7 @@ want $S EOF ' -test_expect_success 'fetch B, S (commit and tag : 1 connection)' ' +test_expect_failure 'fetch B, S (commit and tag : 1 connection)' ' # TODO known breakage rm -f $U && ( cd cloned && diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh index 4008faead8..d62132bf4e 100755 --- a/t/t7001-mv.sh +++ b/t/t7001-mv.sh @@ -305,7 +305,7 @@ test_expect_success 'git mv moves a submodule with a .git directory and no .gitm ( cd sub && rm -f .git && - cp -R -P -p ../.git/modules/sub .git && + cp -a ../.git/modules/sub .git && GIT_WORK_TREE=. git config --unset core.worktree ) && mkdir mod && @@ -328,7 +328,7 @@ test_expect_success 'git mv moves a submodule with a .git directory and .gitmodu ( cd sub && rm -f .git && - cp -R -P -p ../.git/modules/sub .git && + cp -a ../.git/modules/sub .git && GIT_WORK_TREE=. git config --unset core.worktree ) && mkdir mod && diff --git a/t/t9020-remote-svn.sh b/t/t9020-remote-svn.sh index 4d81ba1c2c..7e54d26ced 100755 --- a/t/t9020-remote-svn.sh +++ b/t/t9020-remote-svn.sh @@ -12,6 +12,12 @@ then test_done fi +if test_have_prereq MINGW +then + skip_all='skipping remote-svn tests for lack of POSIX' + test_done +fi + # Override svnrdump with our simulator PATH="$HOME:$PATH" export PATH PYTHON_PATH GIT_BUILD_DIR diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh index b5149fde6e..d5fab265cb 100755 --- a/t/t9350-fast-export.sh +++ b/t/t9350-fast-export.sh @@ -522,4 +522,15 @@ test_expect_success 'delete refspec' ' test_cmp expected actual ' +cat > expected << EOF +reset refs/heads/master +from $(git rev-parse master) + +EOF + +test_expect_failure 'refs are updated even if no commits need to be exported' ' + git fast-export master..master > actual && + test_cmp expected actual +' + test_done