{"thread":{"id":"26400","subject":"[PATCH] some test fixes for msysGit","startedAt":"2011-02-03T15:31:41Z","lastAt":"2011-02-04T11:23:45Z","messageCount":11,"participants":["Pat Thoyts","Johannes Schindelin","Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"160329","messageId":"1296747105-1663-1-git-send-email-patthoyts@users.sourceforge.net","threadId":"26400","inReplyTo":null,"subject":"[PATCH] some test fixes for msysGit","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2011-02-03T15:31:41Z","receivedAt":"2011-02-03T15:31:41Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"The following patches resolve some issues for msysGit running the v1.7.4 tests\n\n t/t3509-cherry-pick-merge-df.sh |    6 ++++--\n t/t4120-apply-popt.sh           |    9 +++++++--\n t/t5526-fetch-submodules.sh     |   32 ++++++++++++++++++--------------\n t/t7407-submodule-foreach.sh    |    4 ++++\n 4 files changed, 33 insertions(+), 18 deletions(-)\n"},{"id":"160332","messageId":"1296747105-1663-2-git-send-email-patthoyts@users.sourceforge.net","threadId":"26400","inReplyTo":"1296747105-1663-1-git-send-email-patthoyts@users.sourceforge.net","subject":"[PATCH 1/4] t3509: use unconstrained initial test to setup repository.","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2011-02-03T15:31:42Z","receivedAt":"2011-02-03T15:31:42Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"The first test did not run on msysGit due to the SYMLINKS constraint and\nso subsequent tests failed because the test repository was not initialized.\n\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n---\n t/t3509-cherry-pick-merge-df.sh |    6 ++++--\n 1 files changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t3509-cherry-pick-merge-df.sh b/t/t3509-cherry-pick-merge-df.sh\nindex 948ca1b..df921d1 100755\n--- a/t/t3509-cherry-pick-merge-df.sh\n+++ b/t/t3509-cherry-pick-merge-df.sh\n@@ -3,12 +3,14 @@\n test_description='Test cherry-pick with directory/file conflicts'\n . ./test-lib.sh\n \n-test_expect_success SYMLINKS 'Setup rename across paths each below D/F conflicts' '\n+test_expect_success 'Initialize repository' '\n \tmkdir a &&\n \t>a/f &&\n \tgit add a &&\n-\tgit commit -m a &&\n+\tgit commit -m a\n+'\n \n+test_expect_success SYMLINKS 'Setup rename across paths each below D/F conflicts' '\n \tmkdir b &&\n \tln -s ../a b/a &&\n \tgit add b &&\n-- \n1.7.4.msysgit.0\n"},{"id":"160331","messageId":"1296747105-1663-3-git-send-email-patthoyts@users.sourceforge.net","threadId":"26400","inReplyTo":"1296747105-1663-1-git-send-email-patthoyts@users.sourceforge.net","subject":"[PATCH 2/4] t4120-apply-popt: help systems with core.filemode=false","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2011-02-03T15:31:43Z","receivedAt":"2011-02-03T15:31:43Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"From: Johannes Sixt <j6t@kdbg.org>\n\nA test case verifies that filemode-only patches work as expected. Help\nsystems where \"test -x\" does not work by applying the test patch also to\nthe index, where the effects can be verified even on such systems.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n---\n t/t4120-apply-popt.sh |    9 +++++++--\n 1 files changed, 7 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t4120-apply-popt.sh b/t/t4120-apply-popt.sh\nindex 579c9e6..a33d510 100755\n--- a/t/t4120-apply-popt.sh\n+++ b/t/t4120-apply-popt.sh\n@@ -6,6 +6,7 @@\n test_description='git apply -p handling.'\n \n . ./test-lib.sh\n+. \"$TEST_DIRECTORY\"/lib-prereq-FILEMODE.sh\n \n test_expect_success setup '\n \tmkdir sub &&\n@@ -62,8 +63,12 @@ test_expect_success 'apply (-p2) diff, mode change only' '\n \told mode 100644\n \tnew mode 100755\n \tEOF\n-\tchmod 644 file1 &&\n-\tgit apply -p2 patch.chmod &&\n+\ttest_chmod -x file1 &&\n+\tgit apply --index -p2 patch.chmod &&\n+\tcase $(git ls-files -s file1) in 100755*) : good;; *) false;; esac\n+'\n+\n+test_expect_success FILEMODE 'file mode was changed' '\n \ttest -x file1\n '\n \n-- \n1.7.4.msysgit.0\n"},{"id":"160330","messageId":"1296747105-1663-4-git-send-email-patthoyts@users.sourceforge.net","threadId":"26400","inReplyTo":"1296747105-1663-1-git-send-email-patthoyts@users.sourceforge.net","subject":"[PATCH 3/4] t7407: fix line endings for mingw build","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2011-02-03T15:31:44Z","receivedAt":"2011-02-03T15:31:44Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n---\n t/t7407-submodule-foreach.sh |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t7407-submodule-foreach.sh b/t/t7407-submodule-foreach.sh\nindex 1d67ef5..4c84764 100755\n--- a/t/t7407-submodule-foreach.sh\n+++ b/t/t7407-submodule-foreach.sh\n@@ -254,6 +254,10 @@ test_expect_success 'ensure \"status --cached --recursive\" preserves the --cached\n \t\t) &&\n \t\tgit submodule status --cached --recursive -- nested1 > ../actual\n \t) &&\n+\tif test_have_prereq MINGW\n+\tthen\n+\t\tdos2unix actual\n+\tfi &&\n \ttest_cmp expect actual\n '\n \n-- \n1.7.4.msysgit.0\n"},{"id":"160333","messageId":"1296747105-1663-5-git-send-email-patthoyts@users.sourceforge.net","threadId":"26400","inReplyTo":"1296747105-1663-1-git-send-email-patthoyts@users.sourceforge.net","subject":"[PATCH 4/4] t5526: avoid dependency on submodule order","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2011-02-03T15:31:45Z","receivedAt":"2011-02-03T15:31:45Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"When running tests on msysGit the actual results appear in the reverse\norder. Added a test_cmp_unordered to test that each expected line is\npresent in the output without depending upon the order of lines.\n\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n---\n t/t5526-fetch-submodules.sh |   32 ++++++++++++++++++--------------\n 1 files changed, 18 insertions(+), 14 deletions(-)\n\ndiff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh\nindex 884a5e5..d218845 100755\n--- a/t/t5526-fetch-submodules.sh\n+++ b/t/t5526-fetch-submodules.sh\n@@ -32,6 +32,10 @@ add_upstream_commit() {\n \t)\n }\n \n+test_cmp_unordered() {\n+\tgrep --line-regexp -f \"$@\" >&3\n+}\n+\n test_expect_success setup '\n \tmkdir deepsubmodule &&\n \t(\n@@ -67,8 +71,8 @@ test_expect_success \"fetch --recurse-submodules recurses into submodules\" '\n \t\tcd downstream &&\n \t\tgit fetch --recurse-submodules >../actual.out 2>../actual.err\n \t) &&\n-\ttest_cmp expect.out actual.out &&\n-\ttest_cmp expect.err actual.err\n+\ttest_cmp_unordered expect.out actual.out &&\n+\ttest_cmp_unordered expect.err actual.err\n '\n \n test_expect_success \"fetch alone only fetches superproject\" '\n@@ -96,8 +100,8 @@ test_expect_success \"using fetchRecurseSubmodules=true in .gitmodules recurses i\n \t\tgit config -f .gitmodules submodule.submodule.fetchRecurseSubmodules true &&\n \t\tgit fetch >../actual.out 2>../actual.err\n \t) &&\n-\ttest_cmp expect.out actual.out &&\n-\ttest_cmp expect.err actual.err\n+\ttest_cmp_unordered expect.out actual.out &&\n+\ttest_cmp_unordered expect.err actual.err\n '\n \n test_expect_success \"--no-recurse-submodules overrides .gitmodules config\" '\n@@ -127,8 +131,8 @@ test_expect_success \"--recurse-submodules overrides fetchRecurseSubmodules setti\n \t\tgit config -f --unset .gitmodules submodule.submodule.fetchRecurseSubmodules true &&\n \t\tgit config --unset submodule.submodule.fetchRecurseSubmodules\n \t) &&\n-\ttest_cmp expect.out actual.out &&\n-\ttest_cmp expect.err actual.err\n+\ttest_cmp_unordered expect.out actual.out &&\n+\ttest_cmp_unordered expect.err actual.err\n '\n \n test_expect_success \"--quiet propagates to submodules\" '\n@@ -146,14 +150,14 @@ test_expect_success \"--dry-run propagates to submodules\" '\n \t\tcd downstream &&\n \t\tgit fetch --recurse-submodules --dry-run >../actual.out 2>../actual.err\n \t) &&\n-\ttest_cmp expect.out actual.out &&\n-\ttest_cmp expect.err actual.err &&\n+\ttest_cmp_unordered expect.out actual.out &&\n+\ttest_cmp_unordered expect.err actual.err &&\n \t(\n \t\tcd downstream &&\n \t\tgit fetch --recurse-submodules >../actual.out 2>../actual.err\n \t) &&\n-\ttest_cmp expect.out actual.out &&\n-\ttest_cmp expect.err actual.err\n+\ttest_cmp_unordered expect.out actual.out &&\n+\ttest_cmp_unordered expect.err actual.err\n '\n \n test_expect_success \"recurseSubmodules=true propagates into submodules\" '\n@@ -163,8 +167,8 @@ test_expect_success \"recurseSubmodules=true propagates into submodules\" '\n \t\tgit config fetch.recurseSubmodules true\n \t\tgit fetch >../actual.out 2>../actual.err\n \t) &&\n-\ttest_cmp expect.out actual.out &&\n-\ttest_cmp expect.err actual.err\n+\ttest_cmp_unordered expect.out actual.out &&\n+\ttest_cmp_unordered expect.err actual.err\n '\n \n test_expect_success \"--recurse-submodules overrides config in submodule\" '\n@@ -177,8 +181,8 @@ test_expect_success \"--recurse-submodules overrides config in submodule\" '\n \t\t) &&\n \t\tgit fetch --recurse-submodules >../actual.out 2>../actual.err\n \t) &&\n-\ttest_cmp expect.out actual.out &&\n-\ttest_cmp expect.err actual.err\n+\ttest_cmp_unordered expect.out actual.out &&\n+\ttest_cmp_unordered expect.err actual.err\n '\n \n test_expect_success \"--no-recurse-submodules overrides config setting\" '\n-- \n1.7.4.msysgit.0\n"},{"id":"160335","messageId":"alpine.DEB.1.00.1102031028150.1541@bonsai2","threadId":"26400","inReplyTo":"1296747105-1663-1-git-send-email-patthoyts@users.sourceforge.net","subject":"Re: [msysGit] [PATCH] some test fixes for msysGit","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2011-02-03T16:29:31Z","receivedAt":"2011-02-03T16:29:31Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 3 Feb 2011, Pat Thoyts wrote:\n\n> The following patches resolve some issues for msysGit running the v1.7.4 \n> tests\n> \n>  t/t3509-cherry-pick-merge-df.sh |    6 ++++--\n>  t/t4120-apply-popt.sh           |    9 +++++++--\n>  t/t5526-fetch-submodules.sh     |   32 ++++++++++++++++++--------------\n>  t/t7407-submodule-foreach.sh    |    4 ++++\n>  4 files changed, 33 insertions(+), 18 deletions(-)\n\nI looked at the first three and think they are obviously fine.\n\nAs I mentioned, I would like to have a fix for the order in git-submodule. \nIf you do not have the time, I will try to push aside some of the work I \nhave to do here and investigate myself.\n\nCiao,\nDscho\n"},{"id":"160346","messageId":"201102032108.54811.j6t@kdbg.org","threadId":"26400","inReplyTo":"1296747105-1663-5-git-send-email-patthoyts@users.sourceforge.net","subject":"Re: [msysGit] [PATCH 4/4] t5526: avoid dependency on submodule order","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2011-02-03T20:08:54Z","receivedAt":"2011-02-03T20:08:54Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"On Donnerstag, 3. Februar 2011, Pat Thoyts wrote:\n> +test_cmp_unordered() {\n> +\tgrep --line-regexp -f \"$@\" >&3\n> +}\n\nI don't think that this is sufficiently portable.\n\nFurthermore, just like Dscho, I'd rather prefer to know why the output is not \nordered as expected.\n\nI'm fine with the other patches as well.\n\nA side note regarding SYMLINKS: It's actually possible to remove 70 of the 130 \nSYMLINKS checks from the test suite:\n\nhttp://repo.or.cz/w/git/mingw/j6t.git/shortlog/refs/heads/war-on-symlinks\n\n-- Hannes\n"},{"id":"160348","messageId":"alpine.DEB.1.00.1102031426110.1541@bonsai2","threadId":"26400","inReplyTo":"201102032108.54811.j6t@kdbg.org","subject":"Re: [msysGit] [PATCH 4/4] t5526: avoid dependency on submodule order","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2011-02-03T20:26:47Z","receivedAt":"2011-02-03T20:26:47Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 3 Feb 2011, Johannes Sixt wrote:\n\n> On Donnerstag, 3. Februar 2011, Pat Thoyts wrote:\n> > +test_cmp_unordered() {\n> > +\tgrep --line-regexp -f \"$@\" >&3\n> > +}\n> \n> I don't think that this is sufficiently portable.\n> \n> Furthermore, just like Dscho, I'd rather prefer to know why the output \n> is not ordered as expected.\n\nHave you seen my response where I proved that it is a fflush() issue, most \nlikely with mingw_spawn()?\n\nCiao,\nDscho\n"},{"id":"160351","messageId":"201102032156.15646.j6t@kdbg.org","threadId":"26400","inReplyTo":"alpine.DEB.1.00.1102031426110.1541@bonsai2","subject":"Re: [msysGit] [PATCH 4/4] t5526: avoid dependency on submodule order","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2011-02-03T20:56:15Z","receivedAt":"2011-02-03T20:56:15Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"On Donnerstag, 3. Februar 2011, Johannes Schindelin wrote:\n> On Thu, 3 Feb 2011, Johannes Sixt wrote:\n> > Furthermore, just like Dscho, I'd rather prefer to know why the output\n> > is not ordered as expected.\n>\n> Have you seen my response where I proved that it is a fflush() issue, most\n> likely with mingw_spawn()?\n\nObviously, I haven't. Good catch!\n\n-- Hannes\n"},{"id":"160380","messageId":"4D4BBBD6.7010100@viscovery.net","threadId":"26400","inReplyTo":"alpine.DEB.1.00.1102031426110.1541@bonsai2","subject":"[PATCH maint] start_command: flush buffers in the WIN32 code path as well","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2011-02-04T08:41:58Z","receivedAt":"2011-02-04T08:41:58Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"From: Johannes Sixt <j6t@kdbg.org>\n\nThe POSIX code path did The Right Thing already, but we have to do the same\non Windows.\n\nThis bug caused failures in t5526-fetch-submodules, where the output of\n'git fetch --recurse-submodules' was in the wrong order.\n\nDebugged-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\nAm 2/3/2011 21:26, schrieb Johannes Schindelin:\n> Have you seen my response where I proved that it is a fflush() issue, most \n> likely with mingw_spawn()?\n\nI think this is the correct fix.\n\n run-command.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/run-command.c b/run-command.c\nindex 2a1041e..f91e446 100644\n--- a/run-command.c\n+++ b/run-command.c\n@@ -194,6 +194,7 @@ fail_pipe:\n \t}\n \n \ttrace_argv_printf(cmd->argv, \"trace: run_command:\");\n+\tfflush(NULL);\n \n #ifndef WIN32\n {\n@@ -201,7 +202,6 @@ fail_pipe:\n \tif (pipe(notify_pipe))\n \t\tnotify_pipe[0] = notify_pipe[1] = -1;\n \n-\tfflush(NULL);\n \tcmd->pid = fork();\n \tif (!cmd->pid) {\n \t\t/*\n-- \n1.7.4.1253.g00c7\n"},{"id":"160391","messageId":"87sjw4jb5q.fsf@fox.patthoyts.tk","threadId":"26400","inReplyTo":"4D4BBBD6.7010100@viscovery.net","subject":"Re: [PATCH maint] start_command: flush buffers in the WIN32 code path as well","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2011-02-04T11:23:45Z","receivedAt":"2011-02-04T11:23:45Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"Johannes Sixt <j.sixt@viscovery.net> writes:\n\n>From: Johannes Sixt <j6t@kdbg.org>\n>\n>The POSIX code path did The Right Thing already, but we have to do the same\n>on Windows.\n>\n>This bug caused failures in t5526-fetch-submodules, where the output of\n>'git fetch --recurse-submodules' was in the wrong order.\n>\n>Debugged-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n>Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n>---\n>Am 2/3/2011 21:26, schrieb Johannes Schindelin:\n>> Have you seen my response where I proved that it is a fflush() issue, most \n>> likely with mingw_spawn()?\n>\n>I think this is the correct fix.\n>\n> run-command.c |    2 +-\n> 1 files changed, 1 insertions(+), 1 deletions(-)\n>\n>diff --git a/run-command.c b/run-command.c\n>index 2a1041e..f91e446 100644\n>--- a/run-command.c\n>+++ b/run-command.c\n>@@ -194,6 +194,7 @@ fail_pipe:\n> \t}\n> \n> \ttrace_argv_printf(cmd->argv, \"trace: run_command:\");\n>+\tfflush(NULL);\n> \n> #ifndef WIN32\n> {\n>@@ -201,7 +202,6 @@ fail_pipe:\n> \tif (pipe(notify_pipe))\n> \t\tnotify_pipe[0] = notify_pipe[1] = -1;\n> \n>-\tfflush(NULL);\n> \tcmd->pid = fork();\n> \tif (!cmd->pid) {\n> \t\t/*\n\nThis fixes the issue for me on msysGit. Thanks.\n\n-- \nPat Thoyts                            http://www.patthoyts.tk/\nPGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD\n"}]}