summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/commit.c')
-rw-r--r--src/commit.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/commit.c b/src/commit.c
index 5197fdb6d..f9606dd72 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -93,9 +93,8 @@ int git_commit_create(
git_odb *odb;
assert(git_object_owner((const git_object *)tree) == repo);
- if (!git_signature__has_valid_version(author) ||
- !git_signature__has_valid_version(committer))
- return -1;
+ GITERR_CHECK_VERSION(author, GIT_SIGNATURE_VERSION, "git_signature");
+ GITERR_CHECK_VERSION(committer, GIT_SIGNATURE_VERSION, "git_signature");
git_oid__writebuf(&commit, "tree ", git_object_id((const git_object *)tree));