Index: tests/fake_repos.py |
diff --git a/tests/fake_repos.py b/tests/fake_repos.py |
index e55b776b2a472a2051cf277112e13157085d5503..85746cf3ab0faf23401d01df8ae6486e50414d53 100755 |
--- a/tests/fake_repos.py |
+++ b/tests/fake_repos.py |
@@ -89,8 +89,9 @@ def commit_svn(repo): |
def commit_git(repo): |
"""Commits the changes and returns the new hash.""" |
check_call(['git', 'add', '-A', '-f'], cwd=repo) |
- out = Popen(['git', 'commit', '-m', 'foo'], cwd=repo).communicate()[0] |
- rev = re.search(r'^\[.*? ([a-f\d]+)\] ', out).group(1) |
+ check_call(['git', 'commit', '-q', '--message', 'foo'], cwd=repo) |
+ rev = Popen(['git', 'show-ref', '--head', 'HEAD'], |
+ cwd=repo).communicate()[0].split(' ', 1)[0] |
logging.debug('At revision %s' % rev) |
return rev |