Force git's output in English by using C locale.
Use [:digit:] instead of \d in grep so that it is more portable.