How to enable (hack) git-p4 in msysgit for Windows

The default installation of msysgit (aka the official git client for Windows) is unfortunately built without python support. There are understandable reasons as to why this is, starting with “where the heck do I find the various python versions on Windows”. For me the problem was that I needed git-p4 to extract some code history out of a Perforce repository and guess what, git-p4 is written in Python. Only solution for me was that I had to find a way to make this work short of throwing Linux in a VM just to get a git import going.

It actually turned out to be fairly simple. The git-p4 that comes with the msysgit installation is a very basic placeholder that the main git executable runs via its shell. Getting the git-p4 plugin to work was a simple case of dropping the “real” from the Linux distribution into an appropriate location and then modifying git-p4 to run my local python with the appropriate command line. Just keep in mind that the shell used by msysgit is a unix shell so you need to make sure that the paths and parameters are in /bin/sh syntax and not in DOS batch syntax. Here’s my current hacked version of git-p4 that seems to do the job:


c:/python27/python “c:/program files (x86)/Git/libexec/git-core/” $1 $2 $3 $4 $5 $6 $7 $8 $9

I guess that’s one way of mounting an SSD

The perils of buying a used computer – yes, I am too cheap or just not rich enough to buy a new Mac Pro – is that sometimes you find that you inherited “interesting” fixes.

Like this SSD mount:

mac-ssd-2 mac-ssd-1


Yes, that’s electrical tape and no, I don’t agree with this special mounting method. At least they did put some electrical tape between the case of the SSD and the case of the DVD drive.



I guess this is one way of saving $20, which is what the correct 2.5″ SSD mounting frame for a recent-ish (2009/2010) Mac Pro costs:

A 2.5" SSD in the correct mounting frame for a Mac Pro
SSD in the correct mounting frame