Improve regexes in utils/git.py