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 /include/git2/diff.h | |
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 'include/git2/diff.h')
-rw-r--r-- | include/git2/diff.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h index fd00378af..6732c30da 100644 --- a/include/git2/diff.h +++ b/include/git2/diff.h @@ -106,16 +106,19 @@ typedef enum { * - max_size: maximum blob size to diff, above this treated as binary */ typedef struct { - unsigned int version; /**< version for the struct */ - uint32_t flags; /**< defaults to GIT_DIFF_NORMAL */ - uint16_t context_lines; /**< defaults to 3 */ - uint16_t interhunk_lines; /**< defaults to 0 */ - char *old_prefix; /**< defaults to "a" */ - char *new_prefix; /**< defaults to "b" */ - git_strarray pathspec; /**< defaults to show all paths */ - git_off_t max_size; /**< defaults to 512Mb */ + unsigned int version; /**< version for the struct */ + uint32_t flags; /**< defaults to GIT_DIFF_NORMAL */ + uint16_t context_lines; /**< defaults to 3 */ + uint16_t interhunk_lines; /**< defaults to 0 */ + char *old_prefix; /**< defaults to "a" */ + char *new_prefix; /**< defaults to "b" */ + git_strarray pathspec; /**< defaults to show all paths */ + git_off_t max_size; /**< defaults to 512mb */ } git_diff_options; +#define GIT_DIFF_OPTIONS_VERSION 1 +#define GIT_DIFF_OPTIONS_INIT {GIT_DIFF_OPTIONS_VERSION, 0} + /** * The diff list object that contains all individual file deltas. */ @@ -304,6 +307,8 @@ typedef struct { unsigned int target_limit; } git_diff_find_options; +#define GIT_DIFF_FIND_OPTIONS_VERSION 1 +#define GIT_DIFF_FIND_OPTIONS_INIT {GIT_DIFF_FIND_OPTIONS_VERSION, 0} /** @name Diff List Generator Functions * |