summaryrefslogtreecommitdiff
path: root/include/git2/diff.h
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2012-11-29 12:26:09 -0800
committerBen Straub <bs@github.com>2012-11-30 12:55:45 -0800
commitbde336ea51df071de922827ae322df7b01b059ce (patch)
tree1fbf4d0e9bf4dc9499abd83226e2452f6e8047c8 /include/git2/diff.h
parentda820437368aae2088e992e7ce8944253693aa16 (diff)
downloadlibgit2-bde336ea51df071de922827ae322df7b01b059ce.tar.gz
Add version fields and init macros for public input structs.
Diffstat (limited to 'include/git2/diff.h')
-rw-r--r--include/git2/diff.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h
index fd00378af..855e4beed 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
*