* [PATCH] Mingw: verify both ends of the pipe () call
@ 2015-08-27 15:55 Johannes Schindelin
2015-08-27 16:09 ` Johannes Schindelin
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Johannes Schindelin @ 2015-08-27 15:55 UTC (permalink / raw)
To: git
From: jfmc <jfmcjf@gmail.com>
The code to open and test the second end of the pipe clearly imitates
the code for the first end. A little too closely, though... Let's fix
the obvious copy-edit bug.
Signed-off-by: Jose F. Morales <jfmcjf@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
compat/mingw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compat/mingw.c b/compat/mingw.c
index 496e6f8..f74da23 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -681,7 +681,7 @@ int pipe(int filedes[2])
return -1;
}
filedes[1] = _open_osfhandle((int)h[1], O_NOINHERIT);
- if (filedes[0] < 0) {
+ if (filedes[1] < 0) {
close(filedes[0]);
CloseHandle(h[1]);
return -1;
--
https://github.com/git/git/pull/168
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] Mingw: verify both ends of the pipe () call
2015-08-27 15:55 [PATCH] Mingw: verify both ends of the pipe () call Johannes Schindelin
@ 2015-08-27 16:09 ` Johannes Schindelin
2015-08-27 21:50 ` Jonathan Nieder
2015-08-28 9:43 ` [PATCH v2] " Johannes Schindelin
2 siblings, 0 replies; 9+ messages in thread
From: Johannes Schindelin @ 2015-08-27 16:09 UTC (permalink / raw)
To: git
Hi all,
On 2015-08-27 17:55, Johannes Schindelin wrote:
> From: jfmc <jfmcjf@gmail.com>
>
> The code to open and test the second end of the pipe clearly imitates
> the code for the first end. A little too closely, though... Let's fix
> the obvious copy-edit bug.
>
> Signed-off-by: Jose F. Morales <jfmcjf@gmail.com>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
For what it's worth: this is my first submitGit submission! ;-)
Ciao,
Dscho
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Mingw: verify both ends of the pipe () call
2015-08-27 15:55 [PATCH] Mingw: verify both ends of the pipe () call Johannes Schindelin
2015-08-27 16:09 ` Johannes Schindelin
@ 2015-08-27 21:50 ` Jonathan Nieder
2015-08-28 8:07 ` Johannes Sixt
` (2 more replies)
2015-08-28 9:43 ` [PATCH v2] " Johannes Schindelin
2 siblings, 3 replies; 9+ messages in thread
From: Jonathan Nieder @ 2015-08-27 21:50 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git, Jose F. Morales, Johannes Sixt
Johannes Schindelin wrote:
> From: jfmc <jfmcjf@gmail.com>
This means the name shown by git shortlog would be jfmc instead of
Jose F. Morales. Intended?
> The code to open and test the second end of the pipe clearly imitates
> the code for the first end. A little too closely, though... Let's fix
> the obvious copy-edit bug.
>
> Signed-off-by: Jose F. Morales <jfmcjf@gmail.com>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
> compat/mingw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
This is an old one --- more than 5 years old (since v1.7.0-rc0~86^2~4
"Windows: simplify the pipe(2) implementation", 2010-01-15). Thanks
for catching it.
Regards,
Jonathan
(patch kept unsnipped for reference)
> diff --git a/compat/mingw.c b/compat/mingw.c
> index 496e6f8..f74da23 100644
> --- a/compat/mingw.c
> +++ b/compat/mingw.c
> @@ -681,7 +681,7 @@ int pipe(int filedes[2])
> return -1;
> }
> filedes[1] = _open_osfhandle((int)h[1], O_NOINHERIT);
> - if (filedes[0] < 0) {
> + if (filedes[1] < 0) {
> close(filedes[0]);
> CloseHandle(h[1]);
> return -1;
>
> --
> https://github.com/git/git/pull/168
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Mingw: verify both ends of the pipe () call
2015-08-27 21:50 ` Jonathan Nieder
@ 2015-08-28 8:07 ` Johannes Sixt
[not found] ` <CAEdsdLdEC7KCgYeu8zmPZWm8uORCwshQo2u9FYQKjrq-sV_bZg@mail.gmail.com>
2015-08-28 9:52 ` Johannes Schindelin
2 siblings, 0 replies; 9+ messages in thread
From: Johannes Sixt @ 2015-08-28 8:07 UTC (permalink / raw)
To: Jonathan Nieder, Johannes Schindelin; +Cc: git, Jose F. Morales
Am 27.08.2015 um 23:50 schrieb Jonathan Nieder:
> Johannes Schindelin wrote:
>
>> From: jfmc <jfmcjf@gmail.com>
>
> This means the name shown by git shortlog would be jfmc instead of
> Jose F. Morales. Intended?
>
>> The code to open and test the second end of the pipe clearly imitates
>> the code for the first end. A little too closely, though... Let's fix
>> the obvious copy-edit bug.
>>
>> Signed-off-by: Jose F. Morales <jfmcjf@gmail.com>
>> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
>> ---
>> compat/mingw.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
>
> This is an old one --- more than 5 years old (since v1.7.0-rc0~86^2~4
> "Windows: simplify the pipe(2) implementation", 2010-01-15). Thanks
> for catching it.
Ouch! Thanks for cleaning up the mess I left behind.
-- Hannes
>
> Regards,
> Jonathan
>
> (patch kept unsnipped for reference)
>
>> diff --git a/compat/mingw.c b/compat/mingw.c
>> index 496e6f8..f74da23 100644
>> --- a/compat/mingw.c
>> +++ b/compat/mingw.c
>> @@ -681,7 +681,7 @@ int pipe(int filedes[2])
>> return -1;
>> }
>> filedes[1] = _open_osfhandle((int)h[1], O_NOINHERIT);
>> - if (filedes[0] < 0) {
>> + if (filedes[1] < 0) {
>> close(filedes[0]);
>> CloseHandle(h[1]);
>> return -1;
>>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Mingw: verify both ends of the pipe () call
[not found] ` <CAEdsdLdEC7KCgYeu8zmPZWm8uORCwshQo2u9FYQKjrq-sV_bZg@mail.gmail.com>
@ 2015-08-28 9:39 ` Johannes Schindelin
2015-08-28 9:44 ` Johannes Schindelin
0 siblings, 1 reply; 9+ messages in thread
From: Johannes Schindelin @ 2015-08-28 9:39 UTC (permalink / raw)
To: Jose F. Morales; +Cc: Jonathan Nieder, git, Johannes Sixt
Hi Jose,
Please 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.
On 2015-08-28 08:37, Jose F. Morales wrote:
> Ops... my fault. I was playing with the web editor and forgot that my
> profile didn't had my real name (now it has).
Great!
> Could I still amend the commit? (it seems to be already pushed into master)
It was pushed to Git for Windows' master, but here it was submitted to the Git mailing list.
Junio, 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.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2] Mingw: verify both ends of the pipe () call
2015-08-27 15:55 [PATCH] Mingw: verify both ends of the pipe () call Johannes Schindelin
2015-08-27 16:09 ` Johannes Schindelin
2015-08-27 21:50 ` Jonathan Nieder
@ 2015-08-28 9:43 ` Johannes Schindelin
2015-08-28 18:14 ` Junio C Hamano
2 siblings, 1 reply; 9+ messages in thread
From: Johannes Schindelin @ 2015-08-28 9:43 UTC (permalink / raw)
To: git
From: Jose F. Morales <jfmcjf@gmail.com>
The code to open and test the second end of the pipe clearly imitates
the code for the first end. A little too closely, though... Let's fix
the obvious copy-edit bug.
Signed-off-by: Jose F. Morales <jfmcjf@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
compat/mingw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compat/mingw.c b/compat/mingw.c
index 496e6f8..f74da23 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -681,7 +681,7 @@ int pipe(int filedes[2])
return -1;
}
filedes[1] = _open_osfhandle((int)h[1], O_NOINHERIT);
- if (filedes[0] < 0) {
+ if (filedes[1] < 0) {
close(filedes[0]);
CloseHandle(h[1]);
return -1;
--
https://github.com/git/git/pull/168
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] Mingw: verify both ends of the pipe () call
2015-08-28 9:39 ` Johannes Schindelin
@ 2015-08-28 9:44 ` Johannes Schindelin
0 siblings, 0 replies; 9+ messages in thread
From: Johannes Schindelin @ 2015-08-28 9:44 UTC (permalink / raw)
To: Jose F. Morales; +Cc: Jonathan Nieder, git, Johannes Sixt
Hi,
On 2015-08-28 11:39, Johannes Schindelin wrote:
> On 2015-08-28 08:37, Jose F. Morales wrote:
>
>> Could I still amend the commit? (it seems to be already pushed into master)
>
> It was pushed to Git for Windows' master, but here it was submitted to
> the Git mailing list.
>
> Junio, 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.
Never mind, it was way too easy to let submitGit show how excellent it is.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Mingw: verify both ends of the pipe () call
2015-08-27 21:50 ` Jonathan Nieder
2015-08-28 8:07 ` Johannes Sixt
[not found] ` <CAEdsdLdEC7KCgYeu8zmPZWm8uORCwshQo2u9FYQKjrq-sV_bZg@mail.gmail.com>
@ 2015-08-28 9:52 ` Johannes Schindelin
2 siblings, 0 replies; 9+ messages in thread
From: Johannes Schindelin @ 2015-08-28 9:52 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: git, Jose F. Morales, Johannes Sixt
Hi Jonathan,
On 2015-08-27 23:50, Jonathan Nieder wrote:
> Johannes Schindelin wrote:
>
>> From: jfmc <jfmcjf@gmail.com>
>
> This means the name shown by git shortlog would be jfmc instead of
> Jose F. Morales. Intended?
Fixed in v2 ;-)
Ciao,
Dscho
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] Mingw: verify both ends of the pipe () call
2015-08-28 9:43 ` [PATCH v2] " Johannes Schindelin
@ 2015-08-28 18:14 ` Junio C Hamano
0 siblings, 0 replies; 9+ messages in thread
From: Junio C Hamano @ 2015-08-28 18:14 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git, Jose F. Morales, Jonathan Nieder, Johannes Sixt
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
> From: Jose F. Morales <jfmcjf@gmail.com>
>
> The code to open and test the second end of the pipe clearly imitates
> the code for the first end. A little too closely, though... Let's fix
> the obvious copy-edit bug.
>
> Signed-off-by: Jose F. Morales <jfmcjf@gmail.com>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
> compat/mingw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/compat/mingw.c b/compat/mingw.c
> index 496e6f8..f74da23 100644
> --- a/compat/mingw.c
> +++ b/compat/mingw.c
> @@ -681,7 +681,7 @@ int pipe(int filedes[2])
> return -1;
> }
> filedes[1] = _open_osfhandle((int)h[1], O_NOINHERIT);
> - if (filedes[0] < 0) {
> + if (filedes[1] < 0) {
> close(filedes[0]);
> CloseHandle(h[1]);
> return -1;
>
> --
> https://github.com/git/git/pull/168
Thanks all. Will queue directly on 'maint' with reviewed-by's and
acked-by's.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-08-28 18:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-27 15:55 [PATCH] Mingw: verify both ends of the pipe () call Johannes Schindelin
2015-08-27 16:09 ` Johannes Schindelin
2015-08-27 21:50 ` Jonathan Nieder
2015-08-28 8:07 ` Johannes Sixt
[not found] ` <CAEdsdLdEC7KCgYeu8zmPZWm8uORCwshQo2u9FYQKjrq-sV_bZg@mail.gmail.com>
2015-08-28 9:39 ` Johannes Schindelin
2015-08-28 9:44 ` Johannes Schindelin
2015-08-28 9:52 ` Johannes Schindelin
2015-08-28 9:43 ` [PATCH v2] " Johannes Schindelin
2015-08-28 18:14 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).