Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support git:// with *old* MinGW #137

Closed
wants to merge 1 commit into from

Conversation

dscho
Copy link
Member

@dscho dscho commented Feb 24, 2019

The MinGW project (which can now be considered "old", as mingw-w64 is the standard thing to use nowadays, since it also supports 64-bit builds) had some problems with our sideband feature, and in Git for Windows <2.x, we introduced a config setting to still allow using the git:// protocol by forcing off the sideband channel.

Let's contribute this patch to upstream Git, at long last.

Changes since v1:

  • Fixed the typo "dump protocol" by talking specifically about the git:// protocol.
  • Dropped a reference in the documentation to a Git for Windows bug that no longer exists, for ages.

Cc: Eric Sunshine [email protected]

@dscho dscho added the ready to submit Has commits that have not been submitted yet label Feb 24, 2019
@dscho
Copy link
Member Author

dscho commented Apr 29, 2019

/submit

@gitgitgadget
Copy link

gitgitgadget bot commented Apr 29, 2019

Submitted as [email protected]

@dscho dscho removed the ready to submit Has commits that have not been submitted yet label Apr 29, 2019
Since commit 0c499ea (send-pack: demultiplex a sideband stream with
status data, 2010-02-05) the built-in send-pack uses the side-band-64k
capability if advertised by the server.

Unfortunately this breaks pushing over the dump git protocol if used
over a network connection when using MinGW (but *not* when using
mingw-w64).

The detailed reasons for this, are courtesy of Jeff Preshing, quoted
from https://groups.google.com/d/msg/msysgit/at8D7J-h7mw/eaLujILGUWoJ:

	MinGW wraps Windows sockets in CRT file descriptors in order to
	mimic the functionality of POSIX sockets. This causes msvcrt.dll
	to treat sockets as Installable File System (IFS) handles,
	calling ReadFile, WriteFile, DuplicateHandle and CloseHandle on
	them. This approach works well in simple cases on recent
	versions of Windows, but does not support all usage patterns.
	In particular, using this approach, any attempt to read & write
	concurrently on the same socket (from one or more processes)
	will deadlock in a scenario where the read waits for a response
	from the server which is only invoked after the write. This is
	what send_pack currently attempts to do in the use_sideband
	codepath.

The new config option "sendpack.sideband" allows to override the
side-band-64k capability of the server, and thus makes the plain git://
protocol work.

As this only affects builds against MinGW, the default is still to use
side band.

[jes: split out the documentation into Documentation/config/, touched up
the commit message.]

Signed-off-by: Thomas Braun <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho added the ready to submit Has commits that have not been submitted yet label Apr 29, 2019
@dscho
Copy link
Member Author

dscho commented May 3, 2019

Dropping this patch, as per the consensus on the mailing list.

@dscho dscho closed this May 3, 2019
@dscho dscho deleted the sideband-bug branch May 3, 2019 08:50
@dscho dscho removed the ready to submit Has commits that have not been submitted yet label May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants