Files
git/README.MinGW
Johannes Sixt f48ce084de MinGW: Make git native protocol work.
As it turns out, the things returned by Winsock2's socket() are handles
that can be passed to ReadFile()/WriteFile() - almost. The way this works
is by wrapping those handles into file descriptors with _open_osfhandle().
But it turns out that the sockets created by the plain socket() function
are prepared for "overlapped" I/O, which confuses ReadFile()/WriteFile().
Therefore, a reimplementation is provided that uses WSASocket() to
explicitly asks for non-overlapped sockets.

Special thanks got to H. Peter Anvin, who provided the necessary clues.
2007-02-02 16:03:07 +01:00

77 lines
2.6 KiB
Plaintext

This is a port of GIT to Windows using MinGW.
The goal of this port is to have the tools runnable from the Windows
command line, not from MinGW's rxvt+bash environment.
(Note: This file was written after-the-fact and may contain errors.
If you are trying this, please make notes and update it.)
INSTALLATION
------------
In order to compile this code you need:
- MSYS, e.g. MSYS-1.0.11-2004.04.30-1.exe
- MinGW, e.g. MinGW-5.0.2.exe
- mingwruntime, e.g. mingw-runtime-3.9.tar.gz
- compilers and tools:
binutils-2.15.91-20040904-1.tar.gz
gcc-core-3.4.2-20040916-1.tar.gz
gcc-g++-3.4.2-20040916-1.tar.gz
gdb-6.3-2.exe
mingw32-make-3.80.0-3.tar.gz
unzip-5.51-1-bin.zip (this is not from MinGW, iirc)
msysDTK-1.0.1.exe (contains ssh, perl)
- additional libraries:
zlib-1.2.3-mingwPORT-1.tar
w32api-3.6.tar.gz
regex-0.12.tar.gz (from the GNU site)
compile this into regex.o, ar it into libregex.a
and install it in /mingw/lib, include file into
/mingw/include
tcltk-8.4.1-1.exe (for gitk, but it's untested so far)
It is absolutely necessary that you install MSYS in a path that does not
contain special characters, like spaces. I have it in
D:\MSYS\1.0
D:\MSYS\1.0\mingw
STATUS
------
This code base will not compile on a POSIX system, although any help
to introduce the necessary #ifdefs is welcome. As such the status quo
is in no way intended to be merged upstream.
This works:
- All the plumbings.
- Many porcelains, in particular, checkout, add, rm, commit, diff,
branch, merge, rebase, log, show, bisect, grep...
- pull, clone, fetch, push via native git protocal as well as ssh.
- Local pull, clone, fetch, push.
- gitk, if invoked as "wish84 <prefix>\bin\gitk", but there are
artefacts in its layout. A workaround by Mark Levedahl is in
branch 'devel'.
This does not work:
- daemon, svn, *import, cvs*
- and certainly a lot more that I never have found a need to look at.
Caveats (aka bugs):
- The automatic pager of commands like log or diff does not work
correctly: It does not display some portion of text at the end.
That is, if what you should see is less than 4K, you see nothing at
all; otherwise something up to 4K at the end is missing. Use
`git log | less' in these cases. Or `set PAGER=cat' (which is
optimized to skip the pager entirely).
- Internally, the ported tools must do their own command line quoting
when other plumbings are executed. This sort of quoting is currently
implemented *very* simplistic: It just watches out for whitespace
and double quote `"' characters. This may become a problem if you have
exotic characters in your file names.