modified to work with git1.2