diff options
Diffstat (limited to 'src/revert.c')
-rw-r--r-- | src/revert.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/revert.c b/src/revert.c index 29e124f6c..9c587724b 100644 --- a/src/revert.c +++ b/src/revert.c @@ -220,14 +220,9 @@ done: return error; } -int git_revert_init_opts(git_revert_options* opts, int version) +int git_revert_init_options(git_revert_options *opts, unsigned int version) { - if (version != GIT_REVERT_OPTIONS_VERSION) { - giterr_set(GITERR_INVALID, "Invalid version %d for git_revert_options", version); - return -1; - } else { - git_revert_options o = GIT_REVERT_OPTIONS_INIT; - memcpy(opts, &o, sizeof(o)); - return 0; - } + GIT_INIT_STRUCTURE_FROM_TEMPLATE( + opts, version, git_revert_options, GIT_REVERT_OPTIONS_INIT); + return 0; } |