diff options
| author | Vicent Martà <vicent@github.com> | 2012-12-05 11:47:19 -0800 |
|---|---|---|
| committer | Vicent Martà <vicent@github.com> | 2012-12-05 11:47:19 -0800 |
| commit | e05ca13f1f3550f59790c0f992841abceee1b4c5 (patch) | |
| tree | a01c119011d0c6020c9288096d09ed055c475bd8 /src/diff_tform.c | |
| parent | a541eafa606b58e7ce3df8e496da8e032fdb74ec (diff) | |
| parent | ee1c33b146a366260a4648b1f29f470fedaca0fa (diff) | |
| download | libgit2-e05ca13f1f3550f59790c0f992841abceee1b4c5.tar.gz | |
Merge pull request #1115 from ben/struct-versions
Version info for public structs
Diffstat (limited to 'src/diff_tform.c')
| -rw-r--r-- | src/diff_tform.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/diff_tform.c b/src/diff_tform.c index 987d4b8e6..0c588594a 100644 --- a/src/diff_tform.c +++ b/src/diff_tform.c @@ -187,7 +187,8 @@ static int normalize_find_opts( if (given != NULL) memcpy(opts, given, sizeof(*opts)); else { - memset(opts, 0, sizeof(*opts)); + git_diff_find_options init = GIT_DIFF_FIND_OPTIONS_INIT; + memmove(opts, &init, sizeof(init)); opts->flags = GIT_DIFF_FIND_RENAMES; @@ -198,6 +199,8 @@ static int normalize_find_opts( opts->flags = GIT_DIFF_FIND_RENAMES | GIT_DIFF_FIND_COPIES; } + GITERR_CHECK_VERSION(opts, GIT_DIFF_FIND_OPTIONS_VERSION, "git_diff_find_options"); + /* some flags imply others */ if (opts->flags & GIT_DIFF_FIND_RENAMES_FROM_REWRITES) |
