fix bogus sha1 calculation in got_object_tree_create()
diff --git a/lib/object_create.c b/lib/object_create.c
index 4d5481f..8c94148 100644
--- a/lib/object_create.c
+++ b/lib/object_create.c
@@ -222,6 +222,8 @@ got_object_tree_create(struct got_object_id **id,
*id = NULL;
+ SHA1Init(&sha1_ctx);
+
SIMPLEQ_FOREACH(te, &entries->head, entry) {
err = mode2str(modebuf, sizeof(modebuf), te->mode);
if (err)