{"thread":{"id":"40198","subject":"[PATCH] Mingw: verify both ends of the pipe () call","startedAt":"2015-08-27T15:55:52Z","lastAt":"2015-08-28T18:14:16Z","messageCount":9,"participants":["Johannes Schindelin","Jonathan Nieder","Johannes Sixt","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"268799","messageId":"0000014f6fdf5839-19f5bc24-80bf-4b9e-a26b-2ef089a28f06-000000@eu-west-1.amazonses.com","threadId":"40198","inReplyTo":null,"subject":"[PATCH] Mingw: verify both ends of the pipe () call","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2015-08-27T15:55:52Z","receivedAt":"2015-08-27T15:55:52Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: jfmc <jfmcjf@gmail.com>\n\nThe code to open and test the second end of the pipe clearly imitates\nthe code for the first end. A little too closely, though... Let's fix\nthe obvious copy-edit bug.\n\nSigned-off-by: Jose F. Morales <jfmcjf@gmail.com>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n compat/mingw.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex 496e6f8..f74da23 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -681,7 +681,7 @@ int pipe(int filedes[2])\n \t\treturn -1;\n \t}\n \tfiledes[1] = _open_osfhandle((int)h[1], O_NOINHERIT);\n-\tif (filedes[0] < 0) {\n+\tif (filedes[1] < 0) {\n \t\tclose(filedes[0]);\n \t\tCloseHandle(h[1]);\n \t\treturn -1;\n\n--\nhttps://github.com/git/git/pull/168\n"},{"id":"268800","messageId":"a65c938c29ac361fbd056d9e284f1aa9@www.dscho.org","threadId":"40198","inReplyTo":"0000014f6fdf5839-19f5bc24-80bf-4b9e-a26b-2ef089a28f06-000000@eu-west-1.amazonses.com","subject":"Re: [PATCH] Mingw: verify both ends of the pipe () call","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2015-08-27T16:09:58Z","receivedAt":"2015-08-27T16:09:58Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi all,\n\nOn 2015-08-27 17:55, Johannes Schindelin wrote:\n> From: jfmc <jfmcjf@gmail.com>\n> \n> The code to open and test the second end of the pipe clearly imitates\n> the code for the first end. A little too closely, though... Let's fix\n> the obvious copy-edit bug.\n> \n> Signed-off-by: Jose F. Morales <jfmcjf@gmail.com>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n\nFor what it's worth: this is my first submitGit submission! ;-)\n\nCiao,\nDscho\n"},{"id":"268805","messageId":"20150827215014.GA8165@google.com","threadId":"40198","inReplyTo":"0000014f6fdf5839-19f5bc24-80bf-4b9e-a26b-2ef089a28f06-000000@eu-west-1.amazonses.com","subject":"Re: [PATCH] Mingw: verify both ends of the pipe () call","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2015-08-27T21:50:14Z","receivedAt":"2015-08-27T21:50:14Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Johannes Schindelin wrote:\n\n> From: jfmc <jfmcjf@gmail.com>\n\nThis means the name shown by git shortlog would be jfmc instead of\nJose F. Morales.  Intended?\n\n> The code to open and test the second end of the pipe clearly imitates\n> the code for the first end. A little too closely, though... Let's fix\n> the obvious copy-edit bug.\n>\n> Signed-off-by: Jose F. Morales <jfmcjf@gmail.com>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n>  compat/mingw.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n\nThis is an old one --- more than 5 years old (since v1.7.0-rc0~86^2~4\n\"Windows: simplify the pipe(2) implementation\", 2010-01-15).  Thanks\nfor catching it.\n\nRegards,\nJonathan\n\n(patch kept unsnipped for reference)\n\n> diff --git a/compat/mingw.c b/compat/mingw.c\n> index 496e6f8..f74da23 100644\n> --- a/compat/mingw.c\n> +++ b/compat/mingw.c\n> @@ -681,7 +681,7 @@ int pipe(int filedes[2])\n>  \t\treturn -1;\n>  \t}\n>  \tfiledes[1] = _open_osfhandle((int)h[1], O_NOINHERIT);\n> -\tif (filedes[0] < 0) {\n> +\tif (filedes[1] < 0) {\n>  \t\tclose(filedes[0]);\n>  \t\tCloseHandle(h[1]);\n>  \t\treturn -1;\n> \n> --\n> https://github.com/git/git/pull/168\n"},{"id":"268826","messageId":"55E016CE.3070009@kdbg.org","threadId":"40198","inReplyTo":"20150827215014.GA8165@google.com","subject":"Re: [PATCH] Mingw: verify both ends of the pipe () call","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2015-08-28T08:07:42Z","receivedAt":"2015-08-28T08:07:42Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 27.08.2015 um 23:50 schrieb Jonathan Nieder:\n> Johannes Schindelin wrote:\n>\n>> From: jfmc <jfmcjf@gmail.com>\n>\n> This means the name shown by git shortlog would be jfmc instead of\n> Jose F. Morales.  Intended?\n>\n>> The code to open and test the second end of the pipe clearly imitates\n>> the code for the first end. A little too closely, though... Let's fix\n>> the obvious copy-edit bug.\n>>\n>> Signed-off-by: Jose F. Morales <jfmcjf@gmail.com>\n>> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n>> ---\n>>   compat/mingw.c | 2 +-\n>>   1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n>\n> This is an old one --- more than 5 years old (since v1.7.0-rc0~86^2~4\n> \"Windows: simplify the pipe(2) implementation\", 2010-01-15).  Thanks\n> for catching it.\n\nOuch! Thanks for cleaning up the mess I left behind.\n\n-- Hannes\n\n>\n> Regards,\n> Jonathan\n>\n> (patch kept unsnipped for reference)\n>\n>> diff --git a/compat/mingw.c b/compat/mingw.c\n>> index 496e6f8..f74da23 100644\n>> --- a/compat/mingw.c\n>> +++ b/compat/mingw.c\n>> @@ -681,7 +681,7 @@ int pipe(int filedes[2])\n>>   \t\treturn -1;\n>>   \t}\n>>   \tfiledes[1] = _open_osfhandle((int)h[1], O_NOINHERIT);\n>> -\tif (filedes[0] < 0) {\n>> +\tif (filedes[1] < 0) {\n>>   \t\tclose(filedes[0]);\n>>   \t\tCloseHandle(h[1]);\n>>   \t\treturn -1;\n>>\n"},{"id":"268828","messageId":"d959c5ad8b7f57e76910ececce47b853@www.dscho.org","threadId":"40198","inReplyTo":"CAEdsdLdEC7KCgYeu8zmPZWm8uORCwshQo2u9FYQKjrq-sV_bZg@mail.gmail.com","subject":"Re: [PATCH] Mingw: verify both ends of the pipe () call","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2015-08-28T09:39:17Z","receivedAt":"2015-08-28T09:39:17Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Jose,\n\nPlease do not top-post; I use top-posting as a tell-tale for mails I can safely delete unread when I have too many mails in my inbox.\n\nOn 2015-08-28 08:37, Jose F. Morales wrote:\n> Ops... my fault. I was playing with the web editor and forgot that my\n> profile didn't had my real name (now it has).\n\nGreat!\n\n> Could I still amend the commit? (it seems to be already pushed into master)\n\nIt was pushed to Git for Windows' master, but here it was submitted to the Git mailing list.\n\nJunio, would you terribly mind fixing the name on your end? Alternatively, I could try to update the Pull Request and give submitGit another chance to show just how awesome it is.\n\nCiao,\nDscho\n"},{"id":"268830","messageId":"0000014f73b0e4ef-12b105a6-5f9c-4131-956f-97a1bd85e072-000000@eu-west-1.amazonses.com","threadId":"40198","inReplyTo":"0000014f6fdf5839-19f5bc24-80bf-4b9e-a26b-2ef089a28f06-000000@eu-west-1.amazonses.com","subject":"[PATCH v2] Mingw: verify both ends of the pipe () call","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2015-08-28T09:43:37Z","receivedAt":"2015-08-28T09:43:37Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Jose F. Morales <jfmcjf@gmail.com>\n\nThe code to open and test the second end of the pipe clearly imitates\nthe code for the first end. A little too closely, though... Let's fix\nthe obvious copy-edit bug.\n\nSigned-off-by: Jose F. Morales <jfmcjf@gmail.com>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n compat/mingw.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex 496e6f8..f74da23 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -681,7 +681,7 @@ int pipe(int filedes[2])\n \t\treturn -1;\n \t}\n \tfiledes[1] = _open_osfhandle((int)h[1], O_NOINHERIT);\n-\tif (filedes[0] < 0) {\n+\tif (filedes[1] < 0) {\n \t\tclose(filedes[0]);\n \t\tCloseHandle(h[1]);\n \t\treturn -1;\n\n--\nhttps://github.com/git/git/pull/168\n"},{"id":"268829","messageId":"2d4fc3abf0e3d46fc1072f8f05dff0ce@www.dscho.org","threadId":"40198","inReplyTo":"d959c5ad8b7f57e76910ececce47b853@www.dscho.org","subject":"Re: [PATCH] Mingw: verify both ends of the pipe () call","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2015-08-28T09:44:50Z","receivedAt":"2015-08-28T09:44:50Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn 2015-08-28 11:39, Johannes Schindelin wrote:\n\n> On 2015-08-28 08:37, Jose F. Morales wrote:\n> \n>> Could I still amend the commit? (it seems to be already pushed into master)\n> \n> It was pushed to Git for Windows' master, but here it was submitted to\n> the Git mailing list.\n> \n> Junio, would you terribly mind fixing the name on your end?\n> Alternatively, I could try to update the Pull Request and give\n> submitGit another chance to show just how awesome it is.\n\nNever mind, it was way too easy to let submitGit show how excellent it is.\n\nCiao,\nDscho\n"},{"id":"268831","messageId":"e9a26e1698dfc5b29d12d87c67e734cd@www.dscho.org","threadId":"40198","inReplyTo":"20150827215014.GA8165@google.com","subject":"Re: [PATCH] Mingw: verify both ends of the pipe () call","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2015-08-28T09:52:07Z","receivedAt":"2015-08-28T09:52:07Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Jonathan,\n\nOn 2015-08-27 23:50, Jonathan Nieder wrote:\n> Johannes Schindelin wrote:\n> \n>> From: jfmc <jfmcjf@gmail.com>\n> \n> This means the name shown by git shortlog would be jfmc instead of\n> Jose F. Morales.  Intended?\n\nFixed in v2 ;-)\n\nCiao,\nDscho\n"},{"id":"268860","messageId":"xmqqtwrj1ds7.fsf@gitster.mtv.corp.google.com","threadId":"40198","inReplyTo":"0000014f73b0e4ef-12b105a6-5f9c-4131-956f-97a1bd85e072-000000@eu-west-1.amazonses.com","subject":"Re: [PATCH v2] Mingw: verify both ends of the pipe () call","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-08-28T18:14:16Z","receivedAt":"2015-08-28T18:14:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n\n> From: Jose F. Morales <jfmcjf@gmail.com>\n>\n> The code to open and test the second end of the pipe clearly imitates\n> the code for the first end. A little too closely, though... Let's fix\n> the obvious copy-edit bug.\n>\n> Signed-off-by: Jose F. Morales <jfmcjf@gmail.com>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n>  compat/mingw.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/compat/mingw.c b/compat/mingw.c\n> index 496e6f8..f74da23 100644\n> --- a/compat/mingw.c\n> +++ b/compat/mingw.c\n> @@ -681,7 +681,7 @@ int pipe(int filedes[2])\n>  \t\treturn -1;\n>  \t}\n>  \tfiledes[1] = _open_osfhandle((int)h[1], O_NOINHERIT);\n> -\tif (filedes[0] < 0) {\n> +\tif (filedes[1] < 0) {\n>  \t\tclose(filedes[0]);\n>  \t\tCloseHandle(h[1]);\n>  \t\treturn -1;\n>\n> --\n> https://github.com/git/git/pull/168\n\nThanks all.  Will queue directly on 'maint' with reviewed-by's and\nacked-by's.\n"}]}