From 95b7175e0795f041ecde4dece5e9e472f4e816f9 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Thu, 29 Aug 2013 13:09:27 +0200 Subject: [PATCH 1/4] MinGW: Use MakeMaker to build the Perl libraries This way the libraries get properly installed into the "site_perl" directory and we just have to move them out of the "mingw" directory. Signed-off-by: Sebastian Schuberth --- config.mak.uname | 1 - 1 file changed, 1 deletion(-) diff --git a/config.mak.uname b/config.mak.uname index d804cb389a7479..02b4b1ddcc75a2 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -487,7 +487,6 @@ ifneq (,$(findstring MINGW,$(uname_S))) NO_MKDTEMP = YesPlease NO_MKSTEMPS = YesPlease NO_SVN_TESTS = YesPlease - NO_PERL_MAKEMAKER = YesPlease RUNTIME_PREFIX = YesPlease NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease NO_NSEC = YesPlease From 145186a0c1c0b5eca7a79a2d01c99fd2482f27f0 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Wed, 4 Sep 2013 18:18:49 +0200 Subject: [PATCH 2/4] Makefile: Set htmldir to match the default HTML docs location under MSYS Signed-off-by: Sebastian Schuberth --- config.mak.uname | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.mak.uname b/config.mak.uname index 02b4b1ddcc75a2..406ef1f2f739d0 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -517,7 +517,7 @@ ifneq (,$(findstring MINGW,$(uname_S))) X = .exe SPARSE_FLAGS = -Wno-one-bit-signed-bitfield ifneq (,$(wildcard ../THIS_IS_MSYSGIT)) - htmldir = doc/git/html/ + htmldir = share/doc/git/$(firstword $(subst -, ,$(GIT_VERSION)))/html prefix = INSTALL = /bin/install EXTLIBS += /mingw/lib/libz.a From 9264b1fabc4a0101b64c64df62f92ec143d1d390 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Thu, 20 Mar 2014 01:11:05 +0100 Subject: [PATCH 3/4] t7800: Use "test_cmp_text" in all places where "echo" is used While "echo", being a Bash built-in, produces Unix line-endings, "git" and "cat" produce DOS line-endings on MSYS, so ignore line-ending differences. Signed-off-by: Sebastian Schuberth --- t/t7800-difftool.sh | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh index dc30a514bf681d..4d0f3d3c947caf 100755 --- a/t/t7800-difftool.sh +++ b/t/t7800-difftool.sh @@ -41,19 +41,19 @@ test_expect_success PERL 'custom commands' ' test_config difftool.test-tool.cmd "cat \"\$REMOTE\"" && echo master >expect && git difftool --no-prompt branch >actual && - test_cmp expect actual && + test_cmp_text expect actual && test_config difftool.test-tool.cmd "cat \"\$LOCAL\"" && echo branch >expect && git difftool --no-prompt branch >actual && - test_cmp expect actual + test_cmp_text expect actual ' test_expect_success PERL 'custom tool commands override built-ins' ' test_config difftool.vimdiff.cmd "cat \"\$REMOTE\"" && echo master >expect && git difftool --tool vimdiff --no-prompt branch >actual && - test_cmp expect actual + test_cmp_text expect actual ' test_expect_success PERL 'difftool ignores bad --tool values' ' @@ -84,7 +84,7 @@ test_expect_success PERL 'difftool honors --gui' ' echo branch >expect && git difftool --no-prompt --gui branch >actual && - test_cmp expect actual + test_cmp_text expect actual ' test_expect_success PERL 'difftool --gui last setting wins' ' @@ -98,14 +98,14 @@ test_expect_success PERL 'difftool --gui last setting wins' ' test_config diff.guitool test-tool && echo branch >expect && git difftool --no-prompt --no-gui --gui branch >actual && - test_cmp expect actual + test_cmp_text expect actual ' test_expect_success PERL 'difftool --gui works without configured diff.guitool' ' difftool_test_setup && echo branch >expect && git difftool --no-prompt --gui branch >actual && - test_cmp expect actual + test_cmp_text expect actual ' # Specify the diff tool using $GIT_DIFF_TOOL @@ -114,7 +114,7 @@ test_expect_success PERL 'GIT_DIFF_TOOL variable' ' git config --unset diff.tool && echo branch >expect && GIT_DIFF_TOOL=test-tool git difftool --no-prompt branch >actual && - test_cmp expect actual + test_cmp_text expect actual ' # Test the $GIT_*_TOOL variables and ensure @@ -126,13 +126,13 @@ test_expect_success PERL 'GIT_DIFF_TOOL overrides' ' echo branch >expect && GIT_DIFF_TOOL=test-tool git difftool --no-prompt branch >actual && - test_cmp expect actual && + test_cmp_text expect actual && test_config diff.tool bogus-tool && test_config merge.tool bogus-tool && GIT_DIFF_TOOL=bogus-tool \ git difftool --no-prompt --tool=test-tool branch >actual && - test_cmp expect actual + test_cmp_text expect actual ' # Test that we don't have to pass --no-prompt to difftool @@ -141,7 +141,7 @@ test_expect_success PERL 'GIT_DIFFTOOL_NO_PROMPT variable' ' difftool_test_setup && echo branch >expect && GIT_DIFFTOOL_NO_PROMPT=true git difftool branch >actual && - test_cmp expect actual + test_cmp_text expect actual ' # git-difftool supports the difftool.prompt variable. @@ -161,7 +161,7 @@ test_expect_success PERL 'difftool.prompt config variable is false' ' test_config difftool.prompt false && echo branch >expect && git difftool branch >actual && - test_cmp expect actual + test_cmp_text expect actual ' # Test that we don't have to pass --no-prompt when mergetool.prompt is false @@ -171,7 +171,7 @@ test_expect_success PERL 'difftool merge.prompt = false' ' test_config mergetool.prompt false && echo branch >expect && git difftool branch >actual && - test_cmp expect actual + test_cmp_text expect actual ' # Test that the -y flag can override difftool.prompt = true @@ -180,7 +180,7 @@ test_expect_success PERL 'difftool.prompt can overridden with -y' ' test_config difftool.prompt true && echo branch >expect && git difftool -y branch >actual && - test_cmp expect actual + test_cmp_text expect actual ' # Test that the --prompt flag can override difftool.prompt = false @@ -198,7 +198,7 @@ test_expect_success PERL 'difftool last flag wins' ' difftool_test_setup && echo branch >expect && git difftool --prompt --no-prompt branch >actual && - test_cmp expect actual && + test_cmp_text expect actual && echo >input && git difftool --no-prompt --prompt branch output && prompt=$(tail -1 expect && git difftool --no-prompt branch >actual && - test_cmp expect actual && + test_cmp_text expect actual && # set merge.tool to something bogus, diff.tool to test-tool test_config merge.tool bogus-tool && test_config diff.tool test-tool && git difftool --no-prompt branch >actual && - test_cmp expect actual + test_cmp_text expect actual ' test_expect_success PERL 'difftool..path' ' @@ -232,21 +232,21 @@ test_expect_success PERL 'difftool --extcmd=cat' ' echo branch >expect && echo master >>expect && git difftool --no-prompt --extcmd=cat branch >actual && - test_cmp expect actual + test_cmp_text expect actual ' test_expect_success PERL 'difftool --extcmd cat' ' echo branch >expect && echo master >>expect && git difftool --no-prompt --extcmd=cat branch >actual && - test_cmp expect actual + test_cmp_text expect actual ' test_expect_success PERL 'difftool -x cat' ' echo branch >expect && echo master >>expect && git difftool --no-prompt -x cat branch >actual && - test_cmp expect actual + test_cmp_text expect actual ' test_expect_success PERL 'difftool --extcmd echo arg1' ' @@ -260,14 +260,14 @@ test_expect_success PERL 'difftool --extcmd cat arg1' ' echo master >expect && git difftool --no-prompt \ --extcmd sh\ -c\ \"cat\ \$1\" branch >actual && - test_cmp expect actual + test_cmp_text expect actual ' test_expect_success PERL 'difftool --extcmd cat arg2' ' echo branch >expect && git difftool --no-prompt \ --extcmd sh\ -c\ \"cat\ \$2\" branch >actual && - test_cmp expect actual + test_cmp_text expect actual ' # Create a second file on master and a different version on branch From 57a35fddbf204bbc24a2f615958a1270c248a56b Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Wed, 4 Sep 2013 17:53:30 +0200 Subject: [PATCH 4/4] t0061: Work around a line endings issue with newer versions of cat on MSYS While msysgit uses cat 2.0, mingwGitDevEnv uses cat 5.97, currently. A change part of the latter version [1] makes cat use the "same rules as other programs to decide whether to use binary I/O". As a result, cat 5.97 behaves like e.g. awk with respect to which line endings are used if stdout is redirected to a file, and those are DOS line endings. Ignore line endings when comparing the test result to work around this. [1] http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commit;h=8770c00ef45e3c6c4dd3d5ce1e55a6fb1adb13dc Signed-off-by: Thomas Braun Signed-off-by: Sebastian Schuberth --- t/t0061-run-command.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t0061-run-command.sh b/t/t0061-run-command.sh index 17e969df609f71..3982bbf9dbd27d 100755 --- a/t/t0061-run-command.sh +++ b/t/t0061-run-command.sh @@ -22,7 +22,7 @@ test_expect_success 'run_command can run a command' ' chmod +x hello.sh && test-run-command run-command ./hello.sh >actual 2>err && - test_cmp hello-script actual && + test_cmp_text hello-script actual && test_cmp empty err '