<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/compat, branch gitk-resize-error</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=gitk-resize-error</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=gitk-resize-error'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2022-01-19T19:27:31Z</updated>
<entry>
<title>getcwd(mingw): handle the case when there is no cwd</title>
<updated>2022-01-19T19:27:31Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-01-19T18:56:01Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=e2724c1ed1ca2605de6cf885bcfc4d512e93a537'/>
<id>urn:sha1:e2724c1ed1ca2605de6cf885bcfc4d512e93a537</id>
<content type='text'>
A recent upstream topic introduced checks for certain Git commands that
prevent them from deleting the current working directory, introducing
also a regression test that ensures that commands such as `git version`
_can_ run without a current working directory.

While technically not possible on Windows via the regular Win32 API, we
do run the regression tests in an MSYS2 Bash which uses a POSIX
emulation layer (the MSYS2/Cygwin runtime) where a really evil hack
_does_ allow to delete a directory even if it is the current working
directory.

Therefore, Git needs to be prepared for a missing working directory,
even on Windows.

This issue was not noticed in upstream Git because there was no caller
that tried to discover a Git directory with a deleted current working
directory in the test suite. But in the microsoft/git fork, we do want
to run `pre-command`/`post-command` hooks for every command, even for
`git version`, which means that we make precisely such a call. The bug
is not in that `pre-command`/`post-command` feature, though, but in
`mingw_getcwd()` and needs to be addressed there.

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 'ma/windows-dynload-fix'</title>
<updated>2022-01-12T23:11:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-01-12T23:11:41Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=a4510f8106a65f42d4ecbe9b826f16e4ff9df6db'/>
<id>urn:sha1:a4510f8106a65f42d4ecbe9b826f16e4ff9df6db</id>
<content type='text'>
Fix calling dynamically loaded functions on Windows.

* ma/windows-dynload-fix:
  lazyload: use correct calling conventions
</content>
</entry>
<entry>
<title>lazyload: use correct calling conventions</title>
<updated>2022-01-09T18:34:53Z</updated>
<author>
<name>Matthias Aßhauer</name>
<email>mha1993@live.de</email>
</author>
<published>2022-01-08T16:02:30Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=4a9b204920152c668228a9d43a63be39b0c32f45'/>
<id>urn:sha1:4a9b204920152c668228a9d43a63be39b0c32f45</id>
<content type='text'>
Christoph Reiter reported on the Git for Windows issue tracker[1], that
mingw_strftime() imports strftime() from ucrtbase.dll with the wrong
calling convention. It should be __cdecl instead of WINAPI, which we
always use in DECLARE_PROC_ADDR().

The MSYS2 project encountered cmake sefaults on x86 Windows caused by
the same issue in the cmake source. [2] There are no known git crashes
that where caused by this, yet, but we should try to prevent them.

We import two other non-WINAPI functions via DECLARE_PROC_ADDR(), too.

* NtSetSystemInformation() (NTAPI)
* GetUserNameExW()         (SEC_ENTRY)

NTAPI, SEC_ENTRY and WINAPI are all ususally defined as __stdcall,
but there are circumstances where they're defined differently.

Teach DECLARE_PROC_ADDR() about calling conventions and be explicit
about when we want to use which calling convention.

Import winnt.h for the definition of NTAPI and sspi.h for SEC_ENTRY
near their respective only users.

[1] https://github.com/git-for-windows/git/issues/3560
[2] https://github.com/msys2/MINGW-packages/issues/10152

Reported-By: Christoph Reiter &lt;reiter.christoph@gmail.com&gt;
Signed-off-by: Matthias Aßhauer &lt;mha1993@live.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'hn/reftable'</title>
<updated>2021-12-15T17:39:45Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-12-15T17:39:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=a4bbd13be360d93f51a0cea6eef436db8622b592'/>
<id>urn:sha1:a4bbd13be360d93f51a0cea6eef436db8622b592</id>
<content type='text'>
The "reftable" backend for the refs API, without integrating into
the refs subsystem, has been added.

* hn/reftable:
  Add "test-tool dump-reftable" command.
  reftable: add dump utility
  reftable: implement stack, a mutable database of reftable files.
  reftable: implement refname validation
  reftable: add merged table view
  reftable: add a heap-based priority queue for reftable records
  reftable: reftable file level tests
  reftable: read reftable files
  reftable: generic interface to tables
  reftable: write reftable files
  reftable: a generic binary tree implementation
  reftable: reading/writing blocks
  Provide zlib's uncompress2 from compat/zlib-compat.c
  reftable: (de)serialization for the polymorphic record type.
  reftable: add blocksource, an abstraction for random access reads
  reftable: utility functions
  reftable: add error related functionality
  reftable: add LICENSE
  hash.h: provide constants for the hash IDs
</content>
</entry>
<entry>
<title>Merge branch 'cb/mingw-gmtime-r'</title>
<updated>2021-12-10T22:35:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-12-10T22:35:15Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=25be7ec4bff10e8865d2a1e9ccd9e4fe125cbe62'/>
<id>urn:sha1:25be7ec4bff10e8865d2a1e9ccd9e4fe125cbe62</id>
<content type='text'>
Build fix on Windows.

* cb/mingw-gmtime-r:
  mingw: avoid fallback for {local,gm}time_r()
</content>
</entry>
<entry>
<title>Merge branch 'jc/unsetenv-returns-an-int'</title>
<updated>2021-11-29T23:41:48Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-11-29T23:41:48Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=0ae87432aa7bbc18664d4f68306e121a2db8a91d'/>
<id>urn:sha1:0ae87432aa7bbc18664d4f68306e121a2db8a91d</id>
<content type='text'>
The compatibility implementation for unsetenv(3) were written to
mimic ancient, non-POSIX, variant seen in an old glibc; it has been
changed to return an integer to match the more modern era.

* jc/unsetenv-returns-an-int:
  unsetenv(3) returns int, not void
</content>
</entry>
<entry>
<title>mingw: avoid fallback for {local,gm}time_r()</title>
<updated>2021-11-28T07:49:20Z</updated>
<author>
<name>Carlo Marcelo Arenas Belón</name>
<email>carenas@gmail.com</email>
</author>
<published>2021-11-27T10:15:32Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=9e12400da8d2b71e1fd7ccaa8f3c9cdbc52df554'/>
<id>urn:sha1:9e12400da8d2b71e1fd7ccaa8f3c9cdbc52df554</id>
<content type='text'>
mingw-w64's pthread_unistd.h had a bug that mistakenly (because there is
no support for the *lockfile() functions required[1]) defined
_POSIX_THREAD_SAFE_FUNCTIONS and that was being worked around since
3ecd153a3b (compat/mingw: support MSys2-based MinGW build, 2016-01-14).

The bug was fixed in winphtreads, but as a side effect, leaves the
reentrant functions from time.h no longer visible and therefore breaks
the build.

Since the intention all along was to avoid using the fallback functions,
formalize the use of POSIX by setting the corresponding feature flag and
compile out the implementation for the fallback functions.

[1] https://unix.org/whitepapers/reentrant.html

Signed-off-by: Carlo Marcelo Arenas Belón &lt;carenas@gmail.com&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>simple-ipc: work around issues with Cygwin's Unix socket emulation</title>
<updated>2021-11-10T17:12:19Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2021-11-10T11:09:10Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=974ef7ced24a782ff32b2248103e25a397276f36'/>
<id>urn:sha1:974ef7ced24a782ff32b2248103e25a397276f36</id>
<content type='text'>
Cygwin emulates Unix sockets by writing files with custom contents and
then marking them as system files.

The tricky problem is that while the file is written and its `system`
bit is set, it is still identified as a file. This caused test failures
when Git is too fast looking for the Unix sockets and then complains
that there is a plain file in the way.

Let's work around this by adding a delayed retry loop, specifically for
Cygwin.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Tested-by: Ramsay Jones &lt;ramsay@ramsayjones.plus.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>unsetenv(3) returns int, not void</title>
<updated>2021-10-29T22:00:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-10-29T21:42:12Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=a38989bd5bc850900667ae1b3c0cd43797b066f0'/>
<id>urn:sha1:a38989bd5bc850900667ae1b3c0cd43797b066f0</id>
<content type='text'>
This compatilibity implementation has been returning a wrong type,
ever since 731043fd (Add compat/unsetenv.c ., 2006-01-25) added to
the system, yet nobody noticed it in the past 16 years, presumably
because no code checks failures in their unsetenv() calls.  Sigh.

For now, make it always succeed.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'cm/save-restore-terminal'</title>
<updated>2021-10-18T22:47:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-10-18T22:47:57Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=853ec9aa9be1b467986dd86ffc36c1c8580a6789'/>
<id>urn:sha1:853ec9aa9be1b467986dd86ffc36c1c8580a6789</id>
<content type='text'>
An editor session launched during a Git operation (e.g. during 'git
commit') can leave the terminal in a funny state.  The code path
has updated to save the terminal state before, and restore it
after, it spawns an editor.

* cm/save-restore-terminal:
  editor: save and reset terminal after calling EDITOR
  terminal: teach git how to save/restore its terminal settings
</content>
</entry>
</feed>
