Update missing bit to the new object model

This commit is contained in:
Carlos Martín Nieto 2015-08-31 20:21:28 +02:00
parent d59752528c
commit 876ddd17eb
1 changed files with 4 additions and 1 deletions

View File

@ -115,7 +115,10 @@ func appendCommit(t *testing.T, repo *Repository) (*Oid, *Oid) {
parent, err := ref.Peel(ObjectCommit)
checkFatal(t, err)
commitId, err := repo.CreateCommit("HEAD", sig, sig, message, tree, parent.(*Commit))
parentCommit, err := parent.AsCommit()
checkFatal(t, err)
commitId, err := repo.CreateCommit("HEAD", sig, sig, message, tree, parentCommit)
checkFatal(t, err)
return commitId, treeId