<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/compat, branch v2.10.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.10.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.10.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-09-19T20:51:42Z</updated>
<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>
<entry>
<title>Merge branch 'js/no-html-bypass-on-windows' into maint</title>
<updated>2016-09-09T04:35:55Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-09-09T04:35:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ba22efd8f5d9bd946925e72b5e6ede91ce2ec9be'/>
<id>urn:sha1:ba22efd8f5d9bd946925e72b5e6ede91ce2ec9be</id>
<content type='text'>
On Windows, help.browser configuration variable used to be ignored,
which has been corrected.

* js/no-html-bypass-on-windows:
  Revert "display HTML in default browser using Windows' shell API"
</content>
</entry>
<entry>
<title>Merge branch 'jk/common-main' into maint</title>
<updated>2016-09-09T04:35:51Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-09-09T04:35:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=faacc8efe503a470c0c549c7949824728d7f1461'/>
<id>urn:sha1:faacc8efe503a470c0c549c7949824728d7f1461</id>
<content type='text'>
There are certain house-keeping tasks that need to be performed at
the very beginning of any Git program, and programs that are not
built-in commands had to do them exactly the same way as "git"
potty does.  It was easy to make mistakes in one-off standalone
programs (like test helpers).  A common "main()" function that
calls cmd_main() of individual program has been introduced to
make it harder to make mistakes.

* jk/common-main:
  mingw: declare main()'s argv as const
  common-main: call git_setup_gettext()
  common-main: call restore_sigpipe_to_default()
  common-main: call sanitize_stdfds()
  common-main: call git_extract_argv0_path()
  add an extra level of indirection to main()
</content>
</entry>
<entry>
<title>compat: move strdup(3) replacement to its own file</title>
<updated>2016-09-07T17:41:45Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2016-09-03T15:59:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ca2baa3f7532dfe1816b623f39489ed10f3c9a49'/>
<id>urn:sha1:ca2baa3f7532dfe1816b623f39489ed10f3c9a49</id>
<content type='text'>
Move our implementation of strdup(3) out of compat/nedmalloc/ and
allow it to be used independently from USE_NED_ALLOCATOR.  The
original nedmalloc doesn't come with strdup() and doesn't need it.
Only _users_ of nedmalloc need it, which was added when we imported
it to our compat/ hierarchy.

This reduces the difference of our copy of nedmalloc from the
original, making it easier to update, and allows for easier testing
and reusing of our version of strdup().

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>mingw: ensure temporary file handles are not inherited by child processes</title>
<updated>2016-08-23T16:09:55Z</updated>
<author>
<name>Ben Wijen</name>
<email>ben@wijen.net</email>
</author>
<published>2016-08-22T12:47:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=05d1ed6148305d299693000856e4971e9f642662'/>
<id>urn:sha1:05d1ed6148305d299693000856e4971e9f642662</id>
<content type='text'>
When the index is locked and child processes inherit the handle to
said lock and the parent process wants to remove the lock before the
child process exits, on Windows there is a problem: it won't work
because files cannot be deleted if a process holds a handle on them.
The symptom:

    Rename from 'xxx/.git/index.lock' to 'xxx/.git/index' failed.
    Should I try again? (y/n)

Spawning child processes with bInheritHandles==FALSE would not work
because no file handles would be inherited, not even the hStdXxx
handles in STARTUPINFO (stdin/stdout/stderr).

Opening every file with O_NOINHERIT does not work, either, as e.g.
git-upload-pack expects inherited file handles.

This leaves us with the only way out: creating temp files with the
O_NOINHERIT flag. This flag is Windows-specific, however. For our
purposes, it is equivalent to O_CLOEXEC (which does not exist on
Windows), so let's just open temporary files with the O_CLOEXEC flag and
map that flag to O_NOINHERIT on Windows.

As Eric Wong pointed out, we need to be careful to handle the case where
the Linux headers used to compile Git support O_CLOEXEC but the Linux
kernel used to run Git does not: it returns an EINVAL.

This fixes the test that we just introduced to demonstrate the problem.

Signed-off-by: Ben Wijen &lt;ben@wijen.net&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>Revert "display HTML in default browser using Windows' shell API"</title>
<updated>2016-08-19T20:47:28Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2016-08-19T08:39:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6db5967d4e6640c5a3ee3cde151c5fdde5ab508f'/>
<id>urn:sha1:6db5967d4e6640c5a3ee3cde151c5fdde5ab508f</id>
<content type='text'>
Since 4804aab (help (Windows): Display HTML in default browser using
Windows' shell API, 2008-07-13), Git for Windows used to call
`ShellExecute()` to launch the default Windows handler for `.html`
files.

The idea was to avoid going through a shell script, for performance
reasons.

However, this change ignores the `help.browser` config setting. Together
with browsing help not being a performance-critical operation, let's
just revert that patch.

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 'js/nedmalloc-gcc6-warnings' into maint</title>
<updated>2016-08-10T18:55:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-08-10T18:55:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=05a6d0e9d08995378e7a37048d60fbae428106fb'/>
<id>urn:sha1:05a6d0e9d08995378e7a37048d60fbae428106fb</id>
<content type='text'>
Squelch compiler warnings for netmalloc (in compat/) library.

* js/nedmalloc-gcc6-warnings:
  nedmalloc: work around overzealous GCC 6 warning
  nedmalloc: fix misleading indentation
</content>
</entry>
<entry>
<title>Merge branch 'ew/daemon-socket-keepalive' into maint</title>
<updated>2016-08-08T21:21:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-08-08T21:21:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=172b811322e30ecb3cd660319890e41bc40006bc'/>
<id>urn:sha1:172b811322e30ecb3cd660319890e41bc40006bc</id>
<content type='text'>
Recent update to "git daemon" tries to enable the socket-level
KEEPALIVE, but when it is spawned via inetd, the standard input
file descriptor may not necessarily be connected to a socket.
Suppress an ENOTSOCK error from setsockopt().

* ew/daemon-socket-keepalive:
  Windows: add missing definition of ENOTSOCK
  daemon: ignore ENOTSOCK from setsockopt
</content>
</entry>
<entry>
<title>nedmalloc: work around overzealous GCC 6 warning</title>
<updated>2016-08-05T22:37:47Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2016-08-04T21:56:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c6c9e1885c9025f2e4074105e4fbe9b008e5d1a3'/>
<id>urn:sha1:c6c9e1885c9025f2e4074105e4fbe9b008e5d1a3</id>
<content type='text'>
With GCC 6, the strdup() function is declared with the "nonnull"
attribute, stating that it is not allowed to pass a NULL value as
parameter.

In nedmalloc()'s reimplementation of strdup(), Postel's Law is heeded
and NULL parameters are handled gracefully. GCC 6 complains about that
now because it thinks that NULL cannot be passed to strdup() anyway.

Because the callers in this project of strdup() must be prepared to
call any implementation of strdup() supplied by the platform, so it
is pointless to pretend that it is OK to call it with NULL.

Remove the conditional based on NULL-ness of the input; this
squelches the warning.  Check the return value of malloc() instead
to make sure we actually got the memory to write to.

See https://gcc.gnu.org/gcc-6/porting_to.html for details.

Diagnosed-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
