Tay Ray Chuan home archive

moving from cygwin to msysgit

Tue, 9 Nov 2010 14:55:55 +0800 | Filed under git, msysgit

I've been building git from source for some time now - but recently, I decided to get msysgit running. Nowadays, I've been working on my laptop, and cygwin-git is sloooow on it - rebase --interactive aside, there is a noticeable lag even for tasks like add and commit.

First up - grabbing the source. I shied away from the recommended way - that is, downloading the netinstaller/fullinstaller, and just got the code directly, since I already have a copy of the git repo locally.

You pretty much have the full installation after fetching the repo - the other bits are run automatically when you start the msys shell, due to a lengthy /etc/profile. Smooth, eh?

If you're unlucky (like me), you might run into some problems. Here are some I encountered:

  1. In the msys shell, I was very very irritated by the lag between prompts. I realised that this was because PS1 was calling my cygwin git installation! Rectifying this is easy - check your bash manual for details.

  2. Due to cygwin being on my PATH, I ended up in a strange situation where the make'd git loaded and used cygwin's dlls. Yuck. Luckily, I've fixed this before - just get msysgit's shell to strip them out of PATH.

    (I've been meaning to submit this as a patch to mssygit for some time now, but haven't gotten around to do it.)

  3. Upgrading the packages in the msysgit installation is a pain - you can't just download and un-lzma the pre-packaged msys packages from Sourceforge, since the later are built on a different, more recent version of msys.dll. I doubt you'll need to do so, but if you do, check out this guide to building your own msys.dll for msysgit.

    (Someone should go and wiki-fy that bit properly!)

blog comments powered by Disqus