Because of a bug in git, this script won't work on Mac systems. I just [sent a patch](https://marc.info/?t=152147109700003&r=1&w=2) to git that should fix this issue.