Greg Hewgill (ghewgill) wrote,
Greg Hewgill
ghewgill

git on windows

Git is mostly written in C, with some important parts in shell and Perl. This works well on Unix-like platforms, but unfortunately suffers on Windows because there is no native Windows (Bourne) shell. Git can be built under the Cygwin environment, but that is a heavyweight solution and Cygwin is not appropriate for general use. msysgit builds a native Windows executable plus uses the msys shell implementation, which provides a workable solution, but still requires Git operations to be done within the msys shell and not the native Windows command shell.

I had a thought the other day, that one could implement a Bourne shell interpreter in a more widely available language such as Python. This would provide a more widely portable option for using Git, and on Windows in particular. Such a shell implementation would provide the minimum implementation necessary to run Git's shell scripts (and which would include minimal implementations of various utitilies such as grep, sed, and awk). That wouldn't solve the Perl script problem, so it seems obvious that a portable shell interpreter designed for use with Git should be written in Perl.

A long time ago there was the Perl Power Tools project, which aimed to provide implementations of various Unix utilities in native Perl. Unfortunately, nobody ever submitted an implementation for sh. Is there any existing implementation of a Bourne-like shell in Perl? More generally, is this a viable plan to make Git work better on Windows?

Update: See the next post to find out just how far I got with this.
Subscribe

  • islands of the world tour 2009

    Amy and I haven't been back to North America to see family since we got married in 2007. We've been talking for a while about taking a trip back,…

  • changing travel plans

    Things are suddenly moving fast. It looks like Amy and I are going to try to make it to Austin in time for SXSW (that means leaving Canada around…

  • photos from the usa southwest trip

    I've finished culling, sorting, and organizing the photos that I took during our trip. There are 339 photos, 132 of which are in the "60 mi Gallery"…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 3 comments