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/diff.c | |
parent | 4ec197f3049d203739066e0c2d2c5c39f78fd808 (diff) | |
download | libgit2-c7231c45fecf6c0ae91815a82db7e98c94689497.tar.gz |
Deploy GITERR_CHECK_VERSION
Diffstat (limited to 'src/diff.c')
-rw-r--r-- | src/diff.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/diff.c b/src/diff.c index 722acbead..46d96bb96 100644 --- a/src/diff.c +++ b/src/diff.c @@ -758,9 +758,8 @@ fail: #define DIFF_FROM_ITERATORS(MAKE_FIRST, MAKE_SECOND) do { \ git_iterator *a = NULL, *b = NULL; \ char *pfx = opts ? git_pathspec_prefix(&opts->pathspec) : NULL; \ - if (!git_diff__opts_has_valid_version(opts)) \ - error = -1; \ - else if (!(error = MAKE_FIRST) && !(error = MAKE_SECOND)) \ + GITERR_CHECK_VERSION(opts, GIT_DIFF_OPTIONS_VERSION, "git_diff_options"); \ + if (!(error = MAKE_FIRST) && !(error = MAKE_SECOND)) \ error = diff_from_iterators(diff, repo, a, b, opts); \ git__free(pfx); git_iterator_free(a); git_iterator_free(b); \ } while (0) |