The check fails with a source tarball, like the one used during spread tests.
```
Error: 2022-01-21 07:44:44 Error executing google:ubuntu-20.04-64:tests/unit/go (jan210735-282406) :
-----
...
Obtaining c-dependencies
HEAD is now at 74f4fe8 Merge pull request #63 from vasi/vasi-win-ci
Checking docs
fatal: not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
File "./check-commit-email.py", line 42, in <module>
commitrange = get_commit_range()
File "./check-commit-email.py", line 22, in get_commit_range
lines = subprocess.check_output(
File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', 'cat-file', '-p', '@']' returned non-zero exit status 128.
Crushing failure and despair.
```
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
Adapted from script from Michael to prevent commits that have non-unicode (or
otherwise invalid) emails set in the commit message from being merged, as this
will break the LP git import.
Signed-off-by: Ian Johnson <ian.johnson@canonical.com>