From ba08877ff0a007c0a2f36dec7948b87e25032d0b Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sat, 8 Jan 2011 17:02:17 +0100 Subject: [PATCH 1/9] Handle new t1501 test case properly with MinGW Signed-off-by: Johannes Schindelin --- t/t1501-work-tree.sh | 4 ++++ 1 file changed, 4 insertions(+) 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 && From e812fc1301f5c904cc796df52b8e24b29a2697f1 Mon Sep 17 00:00:00 2001 From: Sverre Rabbelier Date: Sun, 24 Jul 2011 15:54:04 +0200 Subject: [PATCH 2/9] t9350: point out that refs are not updated correctly This happens only when the corresponding commits are not exported in the current fast-export run. This can happen either when the relevant commit is already marked, or when the commit is explicitly marked as UNINTERESTING with a negative ref by another argument. This breaks fast-export basec remote helpers. Signed-off-by: Sverre Rabbelier --- t/t9350-fast-export.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 From eaea7579b85ed3031f16c0a683e116169257b549 Mon Sep 17 00:00:00 2001 From: Karsten Blees Date: Tue, 10 Sep 2013 13:50:19 -0500 Subject: [PATCH 3/9] t800[12]: work around MSys limitation MSys works very hard to convert Unix-style paths into DOS-style ones. *Very* hard. So hard, indeed, that git blame -L/hello/,/green/ is translated into something like git blame -LC:/msysgit/hello/,C:/msysgit/green/ As seen in msys_p2w in src\msys\msys\rt\src\winsup\cygwin\path.cc, line 3204ff: case '-': // // here we check for POSIX paths as attributes to a POSIX switch. // ... seemingly absolute POSIX paths in single-letter options get expanded by msys.dll unless they contain '=' or ';'. So a quick and very dirty fix is to use '-L/;*evil/'. (Using an equal sign works only when it is before a comma, so in the above example, /=*green/ would still be converted to a DOS-style path.) Commit-message-by: Johannes Schindelin Signed-off-by: Johannes Schindelin --- t/annotate-tests.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) 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)' ' From f0fe1d7d0286888d93af784d0118afbab1b3ca12 Mon Sep 17 00:00:00 2001 From: Stepan Kasal Date: Wed, 14 May 2014 11:18:12 +0200 Subject: [PATCH 4/9] Revert "test: fix t7001 cp to use POSIX options" This reverts commit 00764ca1, as our ancient version of "cp" has problems about the "new" POSIX option "-P" (yields exit code 1). --- t/t7001-mv.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh index 4a2570ed95..618a9acddc 100755 --- a/t/t7001-mv.sh +++ b/t/t7001-mv.sh @@ -308,7 +308,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 && @@ -331,7 +331,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 && From 710fb9d1cec53f55f391327a5138bc903be1ccd9 Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Thu, 25 Sep 2014 19:26:30 +0200 Subject: [PATCH 5/9] t5503: Mark flaky tests as known breakages As non reliable tests are nasty. Signed-off-by: Thomas Braun --- t/t5503-tagfollow.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 && From 3162e04bbc34fd4668067c0fd0ceea34600e9fb0 Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Thu, 2 Oct 2014 14:43:05 +0200 Subject: [PATCH 6/9] t0027: Disable test on MINGW We can't mmap 2GB of RAM on our 32bit platform, so just disable the test. Signed-off-by: Thomas Braun --- t/t0021-conversion.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 && From d7599ca15e429df5acc8e1b7503acce0da80a319 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 8 Oct 2014 11:15:59 +0200 Subject: [PATCH 7/9] Mark t0027-auto-crlf as cheap enough for MinGW t0027 is marked expensive, but really, for MinGW we want to run these tests always. Suggested by Thomas Braun. Signed-off-by: Johannes Schindelin --- t/t0027-auto-crlf.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t0027-auto-crlf.sh b/t/t0027-auto-crlf.sh index 93725895a4..5f6208a95f 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 From a9602270f7dd852e8eddec499b54e2fa337dc12b Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 23 Feb 2015 15:55:47 +0000 Subject: [PATCH 8/9] Skip t9020 with MSys2 POSIX-to-Windows path mangling would make it fail. Signed-off-by: Johannes Schindelin --- t/t9020-remote-svn.sh | 6 ++++++ 1 file changed, 6 insertions(+) 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 From bfacc2bd5ca23a0c5e808d3d39ca7e95608708ef Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 18 Sep 2015 17:32:26 +0200 Subject: [PATCH 9/9] t0302: add forgotten quotes This was probably missed because nobody had a left-over `trash/` directory and the `-f` flag made sure that no error message was produced when the file was not found that *actually* wanted to be removed. Signed-off-by: Johannes Schindelin --- t/t0302-credential-store.sh | 2 +- t/t3900-i18n-commit.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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/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" &&