Commit 5a52d6be4c3a2635a3121b529e0ab2ab674f6be6

Ben Straub 2013-12-11T06:43:17

Check version earlier

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/diff_tform.c b/src/diff_tform.c
index 3ff6108..702e43b 100644
--- a/src/diff_tform.c
+++ b/src/diff_tform.c
@@ -275,6 +275,8 @@ static int normalize_find_opts(
 {
 	git_config *cfg = NULL;
 
+	GITERR_CHECK_VERSION(given, GIT_DIFF_FIND_OPTIONS_VERSION, "git_diff_find_options");
+
 	if (diff->repo != NULL &&
 		git_repository_config__weakptr(&cfg, diff->repo) < 0)
 		return -1;
@@ -302,7 +304,6 @@ static int normalize_find_opts(
 				opts->flags |= GIT_DIFF_FIND_RENAMES;
 		}
 	}
-	GITERR_CHECK_VERSION(given, GIT_DIFF_FIND_OPTIONS_VERSION, "git_diff_find_options");
 
 	/* some flags imply others */