diff options
author | Ben Straub <bs@github.com> | 2012-12-01 04:31:42 +0400 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2012-12-01 04:31:42 +0400 |
commit | c7231c45fecf6c0ae91815a82db7e98c94689497 (patch) | |
tree | 33426a5463917d64b1f160f8083f3dfbd4217fe3 /src/diff_tform.c | |
parent | 4ec197f3049d203739066e0c2d2c5c39f78fd808 (diff) |
Deploy GITERR_CHECK_VERSION
Diffstat (limited to 'src/diff_tform.c')
-rw-r--r-- | src/diff_tform.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/diff_tform.c b/src/diff_tform.c index 1df041044..0c588594a 100644 --- a/src/diff_tform.c +++ b/src/diff_tform.c @@ -168,18 +168,6 @@ int git_diff_merge( return error; } -static bool find_opts_has_valid_version(const git_diff_find_options *opts) -{ - if (!opts) - return true; - - if (opts->version > 0 && opts->version <= GIT_DIFF_FIND_OPTIONS_VERSION) - return true; - - giterr_set(GITERR_INVALID, "Invalid version %d on git_diff_find_options", opts->version); - return false; -} - #define DEFAULT_THRESHOLD 50 #define DEFAULT_BREAK_REWRITE_THRESHOLD 60 #define DEFAULT_TARGET_LIMIT 200 @@ -211,8 +199,7 @@ static int normalize_find_opts( opts->flags = GIT_DIFF_FIND_RENAMES | GIT_DIFF_FIND_COPIES; } - if (!find_opts_has_valid_version(opts)) - return -1; + GITERR_CHECK_VERSION(opts, GIT_DIFF_FIND_OPTIONS_VERSION, "git_diff_find_options"); /* some flags imply others */ |