git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 0/3] Really fix the isatty() problem on Windows

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 22, 2016, 18:19 UTC
Message-ID
<xmqq37hfhln5.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<xmqqd1gjhn0u.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 12 quoted lines
> Johannes Schindelin <johannes.schindelin@gmx.de> writes:
> ...
>> - fixed the confusing commit message by using Junio's suggested
>>   replacement
>
> Sorry, but I didn't mean to "suggest replacement".  I was just
> testing my understanding by attempt to rephrase the gist of it.
> ...
> Your "use this opportunity to actually clean up" above suggests that
> the answer is the latter, but if you took my "summary of my
> understanding", it is likely that that fact is not captured in the
> resulting log message.

So using the original log message in v1 and what you wrote in the message I was responding to as references, let me try a real "suggested" one as penance.

I need to ask one clarification on what you wrote before completing that effort, though.

Show 5 quoted lines
>> And incidentally, replacing the previous hack with the clean, new
>> solution, which specifies explicitly for the file descriptors 0, 1 and 2
>> whether we detected an MSYS2 pseudo-tty, whether we detected a real
>> Win32 Console, and whether we had to swap out a real Win32 Console for a
>> pipe to allow child processes to inherit it.
This has subject but not verb.  I parsed the above like so:
    Replacing the previous hack with the clean, new solution (which
    specifies explicitly for the file descriptors 0, 1 and 2
     - whether we detected an MSYS2 pseudo-tty, 
     - whether we detected a real Win32 Console, and 
     - whether we had to swap out a real Win32 Console for a
       pipe to allow child processes to inherit it
    )

So the entire thing is a noun phrase "replacing with a new patch", and I take that as the subject of an unfinished sentence. What did that subject do? Replacing with a new patch allows us to do "this wonderful thing", but what "this wonderful thing" is not clear.

Subject: mingw: replace isatty() hack
From: Jeff Hostetler <jeffhost@microsoft.com>

For over a year, Git for Windows has carried a patch that detects the MSYS2 pseudo ttys used by Git for Windows' default Git Bash (i.e. a terminal that is not backed by a Win32 Console), but it did so by accessing internals of a previous MSVC runtime that is no longer valid in newer versions.

Clean up this mess by backporting a patch that was originally done to compile Git with a recent VC++. Replacing the previous hack with the clean, new solution, which specifies explicitly for the file descriptors 0, 1 and 2 whether we detected an MSYS2 pseudo-tty, whether we detected a real Win32 Console, and whether we had to swap out a real Win32 Console for a pipe to allow child processes to inherit it, lets us do XXXXX.

As a side effect (which was the reason for the back-port), this patch also fixes the previous misguided attempt to intercept isatty() so that it handles character devices (such as /dev/null) as Git expects it.

Previous: Junio C HamanoNext: Johannes Schindelin
Message 24 of 29 in “Really fix the isatty() problem on Windows”
  1. 0/2 Really fix the isatty() problem on WindowsJohannes Schindelin, Dec 21, 2016
  2. 1/2 mingw: adjust is_console() to work with stdinJohannes Schindelin, Dec 21, 2016
  3. 2/2 mingw: replace isatty() hackJohannes Schindelin, Dec 21, 2016
  4. Junio C HamanoDec 21, 2016
  5. Johannes SixtDec 21, 2016
  6. Junio C HamanoDec 21, 2016
  7. Johannes SixtDec 22, 2016
  8. Johannes SchindelinDec 22, 2016
  9. 0/3 Really fix the isatty() problem on WindowsJohannes Schindelin, Dec 22, 2016
  10. 2/3 mingw: fix colourization on Cygwin pseudo terminalsJohannes Schindelin, Dec 22, 2016
  11. 3/3 mingw: replace isatty() hackJohannes Schindelin, Dec 22, 2016
  12. Johannes SixtDec 22, 2016
  13. Johannes SchindelinDec 22, 2016
  14. Johannes SixtDec 22, 2016
  15. Johannes SchindelinDec 22, 2016
  16. 1/3 mingw: adjust is_console() to work with stdinJohannes Schindelin, Dec 22, 2016
  17. Beat BolliDec 22, 2016
  18. Junio C HamanoDec 22, 2016
  19. Johannes SchindelinDec 23, 2016
  20. Beat BolliDec 23, 2016
  21. Junio C HamanoDec 22, 2016
  22. Johannes SchindelinDec 22, 2016
  23. Junio C HamanoDec 22, 2016
  24. Junio C HamanoDec 22, 2016
  25. 0/3 Really fix the isatty() problem on WindowsJohannes Schindelin, Dec 22, 2016
  26. 1/3 mingw: adjust is_console() to work with stdinJohannes Schindelin, Dec 22, 2016
  27. 2/3 mingw: fix colourization on Cygwin pseudo terminalsJohannes Schindelin, Dec 22, 2016
  28. 3/3 mingw: replace isatty() hackJohannes Schindelin, Dec 22, 2016
  29. Johannes SchindelinJan 18, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.