Git.vala
authorAlan Knowles <alan@roojs.com>
Tue, 12 Mar 2019 07:53:07 +0000 (15:53 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 12 Mar 2019 07:53:07 +0000 (15:53 +0800)
Git.vala

index 90c3ebf..042506f 100644 (file)
--- a/Git.vala
+++ b/Git.vala
@@ -29,6 +29,12 @@ void main()
        ix.write();
        var treeoid = index.write_tree();
 
+       var head = d_repository.get_head();
+       var parent = head.lookup() as Ggit.Commit;
+       Ggit.Commit[] parents = (parent == null) ? 
+               new Ggit.Commit[] {} :
+               new Ggit.Commit[] { parent };
+
        var tree = a.repo.lookup<Ggit.Tree>(treeoid); // odd format.. 
        
        var sig = new Ggit.Signature.now("Alan Knowles", "alan@roojs.com");