diff options
author | Ben Straub <bs@github.com> | 2012-11-30 16:31:42 -0800 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2012-11-30 16:31:42 -0800 |
commit | c7231c45fecf6c0ae91815a82db7e98c94689497 (patch) | |
tree | 33426a5463917d64b1f160f8083f3dfbd4217fe3 /src/notes.c | |
parent | 4ec197f3049d203739066e0c2d2c5c39f78fd808 (diff) | |
download | libgit2-c7231c45fecf6c0ae91815a82db7e98c94689497.tar.gz |
Deploy GITERR_CHECK_VERSION
Diffstat (limited to 'src/notes.c')
-rw-r--r-- | src/notes.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/notes.c b/src/notes.c index 87ee1e742..71a9e33ad 100644 --- a/src/notes.c +++ b/src/notes.c @@ -456,9 +456,8 @@ int git_note_create( git_commit *commit = NULL; git_tree *tree = NULL; - 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"); target = git_oid_allocfmt(oid); GITERR_CHECK_ALLOC(target); @@ -487,9 +486,8 @@ int git_note_remove(git_repository *repo, const char *notes_ref, git_commit *commit = NULL; git_tree *tree = NULL; - 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"); target = git_oid_allocfmt(oid); GITERR_CHECK_ALLOC(target); |