summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/commit.c')
-rw-r--r--src/commit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/commit.c b/src/commit.c
index 46c02c292..aec3e1e63 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -149,6 +149,7 @@ int git_commit_create(
const git_oid **parent_oids;
assert(parent_count >= 0);
+ assert(git_object_owner((const git_object *)tree) == repo);
parent_oids = git__malloc(parent_count * sizeof(git_oid *));
GITERR_CHECK_ALLOC(parent_oids);