From 45a86bbfd028a545a71d3e1ea5518d467be8b5aa Mon Sep 17 00:00:00 2001 From: Jacques Germishuys Date: Mon, 9 Mar 2015 17:02:52 +0200 Subject: Allow for merges with whitespace discrepancies --- include/git2/merge.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'include/git2') diff --git a/include/git2/merge.h b/include/git2/merge.h index 40330d0d8..73375b319 100644 --- a/include/git2/merge.h +++ b/include/git2/merge.h @@ -110,6 +110,23 @@ typedef enum { GIT_MERGE_FILE_FAVOR_UNION = 3, } git_merge_file_favor_t; +/** + * Whitespace merging flags + */ +typedef enum { + /** Defaults */ + GIT_MERGE_FILE_IGNORE_DEFAULT = 0, + + /** Ignore all whitespace */ + GIT_MERGE_FILE_IGNORE_WHITESPACE = (1 << 0), + + /** Ignore changes in amount of whitespace */ + GIT_MERGE_FILE_IGNORE_WHITESPACE_CHANGE = (1 << 1), + + /** Ignore whitespace at end of line */ + GIT_MERGE_FILE_IGNORE_WHITESPACE_EOL = (1 << 2), +} git_merge_file_whitespace_t; + /** * File merging flags */ @@ -156,6 +173,9 @@ typedef struct { /** Merge file flags. */ git_merge_file_flags_t flags; + + /** Whitespace merge flags */ + unsigned int whitespace_flags; } git_merge_file_options; #define GIT_MERGE_FILE_OPTIONS_VERSION 1 @@ -230,6 +250,9 @@ typedef struct { /** Flags for handling conflicting content. */ git_merge_file_favor_t file_favor; + + /** Flags for handling whitespace */ + unsigned int whitespace_flags; } git_merge_options; #define GIT_MERGE_OPTIONS_VERSION 1 -- cgit v1.2.1