Re: Possibility of a MinGW version?
From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:42:15
Hi, On Sat, 24 Dec 2005, Andreas Ericsson wrote:
Sven Verdoolaege wrote:quoted
On Sat, Dec 24, 2005 at 11:09:39AM +0100, Andreas Ericsson wrote:quoted
The worst trouble you're likely to run into is all the hardcoded paths. They are everywhere and ofcourse use the / for path entity separation.AFAIR, '/' is a valid path separator on Windows. It's just command.com (does that still exist?) that insisted on '\\' separators.Are you sure? I've seen lots of porting patches that transliterate those to '\\'. Perhaps those who wrote those patches just took for granted that it was needed, the same as I did.
I tried it (IIRC even on Win98) and it worked with '/'. If not, it is relatively easy to introduce compat_mkdir and compat_open. (We need compat_mkdir anyway, because the good MinGW people thought it a good idea to change the signature from standard mkdir(path, mode) to mkdir(path); a major annoyance when porting things to MinGW). A bigger obstacle is the ubiquitous "c:/blabla". While you can make sure that git internally never uses such a rubbish (would be "/c/blabla" in MinGW), there are always the users.
quoted
quoted
The fact that there are 39 bash'ish shell-scripts does little to help a native port, and although they can be fairly easily replaced by "real" programs it still means quite a bit of work with little real value for the unix-version, so I'm guessing you'll have to write those up for yourself.Or just use MinGW's bash.
That is correct. MinGW comes with a current bash. The biggest stoppers, however, are the absence of fork() and of ssh. I don't know how many times fork() is used just to call another program, and then return the the original program. I believe there are some other cases, where there is bidirectional communication between the two. This is not so easy. Without ssh, you have only http-push left to do the push, which in turn needs a WebServer set up with DAV. Furthermore, you can only fetch via HTTP or the git protocol, which both means setting up a server, i.e. you have no way to move your data directly between two private repositories. Yes, there are other SSH's out there. But in order to communicate with the other side, MinGW would have to fork() with bidirectional communication. Bummer. I can understand that people would prefer a MinGW version to a cygwin one, because of the performance hit, but unfortunately it is probably not worth the trouble. I, for one, would not do the work without getting paid very well for the job. Ciao, Dscho