|
@@ -587,6 +587,17 @@ class BuildRepoRootTests(TestCase):
|
|
|
tree = r[r[commit_sha].tree]
|
|
|
self.assertEqual([], list(tree.iteritems()))
|
|
|
|
|
|
+ def test_commit_follows(self):
|
|
|
+ r = self._repo
|
|
|
+ r.refs.set_symbolic_ref(b'HEAD', b'refs/heads/bla')
|
|
|
+ commit_sha = r.do_commit(b'commit with strange character',
|
|
|
+ committer=b'Test Committer <test@nodomain.com>',
|
|
|
+ author=b'Test Author <test@nodomain.com>',
|
|
|
+ commit_timestamp=12395, commit_timezone=0,
|
|
|
+ author_timestamp=12395, author_timezone=0,
|
|
|
+ ref=b'HEAD')
|
|
|
+ self.assertEqual(commit_sha, r[b'refs/heads/bla'].id)
|
|
|
+
|
|
|
def test_commit_encoding(self):
|
|
|
r = self._repo
|
|
|
commit_sha = r.do_commit(b'commit with strange character \xee',
|