<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/compat, branch v2.11.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.11.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.11.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-01-31T21:32:11Z</updated>
<entry>
<title>Merge branch 'js/mingw-isatty' into maint</title>
<updated>2017-01-31T21:32:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-01-31T21:32:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6a7e25d155adb2c8a44173ec80fac7b0385a55a7'/>
<id>urn:sha1:6a7e25d155adb2c8a44173ec80fac7b0385a55a7</id>
<content type='text'>
An update to a topic that is already in 'master'.

* js/mingw-isatty:
  mingw: follow-up to "replace isatty() hack"
</content>
</entry>
<entry>
<title>mingw: follow-up to "replace isatty() hack"</title>
<updated>2017-01-18T21:31:25Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2017-01-18T12:14:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1d3f065e0e4090a78640642cc1c1a3ce91d7852a'/>
<id>urn:sha1:1d3f065e0e4090a78640642cc1c1a3ce91d7852a</id>
<content type='text'>
The version of the "replace isatty() hack" that got merged a few
weeks ago did not actually reflect the latest iteration of the patch
series: v3 was sent out with these changes, as requested by the
reviewer Johannes Sixt:

- reworded the comment about "recycling handles"

- moved the reassignment of the `console` variable before the dup2()
  call so that it is valid at all times

- removed the "handle = INVALID_HANDLE_VALUE" assignment, as the local
  variable `handle` is not used afterwards anyway

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Reviewed-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mk/mingw-winansi-ttyname-termination-fix' into maint</title>
<updated>2017-01-17T23:19:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-01-17T23:19:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8554ee155d8e69703dfaa04d03cd45f2d82f1a0f'/>
<id>urn:sha1:8554ee155d8e69703dfaa04d03cd45f2d82f1a0f</id>
<content type='text'>
A potential but unlikely buffer overflow in Windows port has been
fixed.

* mk/mingw-winansi-ttyname-termination-fix:
  mingw: consider that UNICODE_STRING::Length counts bytes
</content>
</entry>
<entry>
<title>mingw: replace isatty() hack</title>
<updated>2016-12-22T17:58:46Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2016-12-22T17:09:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a9b8a09c3c30886c79133da9f48ef9f98c21c3b2'/>
<id>urn:sha1:a9b8a09c3c30886c79133da9f48ef9f98c21c3b2</id>
<content type='text'>
Git for Windows has carried a patch that depended on internals
of MSVC runtime, but it does not work correctly with recent MSVC
runtime. A replacement was written originally for compiling
with VC++. The patch in this message is a backport of that
replacement, and it also fixes the previous attempt to make
isatty() tell that /dev/null is *not* an interactive terminal.

Signed-off-by: Jeff Hostetler &lt;jeffhost@microsoft.com&gt;
Tested-by: Beat Bolli &lt;dev+git@drbeat.li&gt;
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>mingw: fix colourization on Cygwin pseudo terminals</title>
<updated>2016-12-22T17:58:29Z</updated>
<author>
<name>Alan Davies</name>
<email>alan.n.davies@gmail.com</email>
</author>
<published>2016-12-22T17:09:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=86924838e3d881cda2192fd79ac3a58aad75efd3'/>
<id>urn:sha1:86924838e3d881cda2192fd79ac3a58aad75efd3</id>
<content type='text'>
Git only colours the output and uses pagination if isatty() returns 1.
MSYS2 and Cygwin emulate pseudo terminals via named pipes, meaning that
isatty() returns 0.

f7f90e0f4f (mingw: make isatty() recognize MSYS2's pseudo terminals
(/dev/pty*), 2016-04-27) fixed this for MSYS2 terminals, but not for
Cygwin.

The named pipes that Cygwin and MSYS2 use are very similar. MSYS2 PTY pipes
are called 'msys-*-pty*' and Cygwin uses 'cygwin-*-pty*'. This commit
modifies the existing check to allow both MSYS2 and Cygwin PTY pipes to be
identified as TTYs.

Note that pagination is still broken when running Git for Windows from
within Cygwin, as MSYS2's less.exe is spawned (and does not like to
interact with Cygwin's PTY).

This partially fixes https://github.com/git-for-windows/git/issues/267

Signed-off-by: Alan Davies &lt;alan.n.davies@gmail.com&gt;
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>mingw: adjust is_console() to work with stdin</title>
<updated>2016-12-22T17:58:20Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2016-12-22T17:08:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fee807c5f6da43ba03f4f92d832fd625ab57b0d7'/>
<id>urn:sha1:fee807c5f6da43ba03f4f92d832fd625ab57b0d7</id>
<content type='text'>
When determining whether a handle corresponds to a *real* Win32 Console
(as opposed to, say, a character device such as /dev/null), we use the
GetConsoleOutputBufferInfo() function as a tell-tale.

However, that does not work for *input* handles associated with a
console. Let's just use the GetConsoleMode() function for input handles,
and since it does not work on output handles fall back to the previous
method for those.

This patch prepares for using is_console() instead of my previous
misguided attempt in cbb3f3c9b1 (mingw: intercept isatty() to handle
/dev/null as Git expects it, 2016-12-11) that broke everything on
Windows.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>mingw: consider that UNICODE_STRING::Length counts bytes</title>
<updated>2016-12-20T17:04:57Z</updated>
<author>
<name>Max Kirillov</name>
<email>max@max630.net</email>
</author>
<published>2016-12-19T21:32:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c46458e82f0112ed288bcf89bea973b859e1854e'/>
<id>urn:sha1:c46458e82f0112ed288bcf89bea973b859e1854e</id>
<content type='text'>
UNICODE_STRING::Length field means size of buffer in bytes[1],
despite of buffer itself being array of wchar_t. Because of that
terminating zero is placed twice as far. Fix it.

[1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa380518.aspx

Signed-off-by: Max Kirillov &lt;max@max630.net&gt;
Acked-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>mingw: intercept isatty() to handle /dev/null as Git expects it</title>
<updated>2016-12-12T00:15:46Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2016-12-11T11:16:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cbb3f3c9b1975c9bdd07f24fc4ef4e504507adaa'/>
<id>urn:sha1:cbb3f3c9b1975c9bdd07f24fc4ef4e504507adaa</id>
<content type='text'>
When Git's source code calls isatty(), it really asks whether the
respective file descriptor is connected to an interactive terminal.

Windows' _isatty() function, however, determines whether the file
descriptor is associated with a character device. And NUL, Windows'
equivalent of /dev/null, is a character device.

Which means that for years, Git mistakenly detected an associated
interactive terminal when being run through the test suite, which
almost always redirects stdin, stdout and stderr to /dev/null.

This bug only became obvious, and painfully so, when the new
bisect--helper entered the `pu` branch and made the automatic build &amp; test
time out because t6030 was waiting for an answer.

For details, see

	https://msdn.microsoft.com/en-us/library/f4s0ddew.aspx

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rs/compat-strdup' into maint</title>
<updated>2016-09-19T20:51:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-09-19T20:51:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=815a73f7143214510fae6e8a2f2077b2e8694509'/>
<id>urn:sha1:815a73f7143214510fae6e8a2f2077b2e8694509</id>
<content type='text'>
Code cleanup.

* rs/compat-strdup:
  compat: move strdup(3) replacement to its own file
</content>
</entry>
<entry>
<title>Merge branch 'bw/mingw-avoid-inheriting-fd-to-lockfile' into maint</title>
<updated>2016-09-09T04:35:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-09-09T04:35:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c0e8b3b444a701630c0793c195fd0e8162a95c2c'/>
<id>urn:sha1:c0e8b3b444a701630c0793c195fd0e8162a95c2c</id>
<content type='text'>
The tempfile (hence its user lockfile) API lets the caller to open
a file descriptor to a temporary file, write into it and then
finalize it by first closing the filehandle and then either
removing or renaming the temporary file.  When the process spawns a
subprocess after obtaining the file descriptor, and if the
subprocess has not exited when the attempt to remove or rename is
made, the last step fails on Windows, because the subprocess has
the file descriptor still open.  Open tempfile with O_CLOEXEC flag
to avoid this (on Windows, this is mapped to O_NOINHERIT).

* bw/mingw-avoid-inheriting-fd-to-lockfile:
  mingw: ensure temporary file handles are not inherited by child processes
  t6026-merge-attr: child processes must not inherit index.lock handles
</content>
</entry>
</feed>
