@@ -44,7 +44,7 @@ impl MergeOptions {
44
44
opts
45
45
}
46
46
47
- fn flag ( & mut self , opt : raw :: git_merge_flag_t , val : bool ) -> & mut MergeOptions {
47
+ fn flag ( & mut self , opt : u32 , val : bool ) -> & mut MergeOptions {
48
48
if val {
49
49
self . raw . flags |= opt;
50
50
} else {
@@ -55,25 +55,25 @@ impl MergeOptions {
55
55
56
56
/// Detect file renames
57
57
pub fn find_renames ( & mut self , find : bool ) -> & mut MergeOptions {
58
- self . flag ( raw:: GIT_MERGE_FIND_RENAMES , find)
58
+ self . flag ( raw:: GIT_MERGE_FIND_RENAMES as u32 , find)
59
59
}
60
60
61
61
/// If a conflict occurs, exit immediately instead of attempting to continue
62
62
/// resolving conflicts
63
63
pub fn fail_on_conflict ( & mut self , fail : bool ) -> & mut MergeOptions {
64
- self . flag ( raw:: GIT_MERGE_FAIL_ON_CONFLICT , fail)
64
+ self . flag ( raw:: GIT_MERGE_FAIL_ON_CONFLICT as u32 , fail)
65
65
}
66
66
67
67
/// Do not write the REUC extension on the generated index
68
68
pub fn skip_reuc ( & mut self , skip : bool ) -> & mut MergeOptions {
69
- self . flag ( raw:: GIT_MERGE_FAIL_ON_CONFLICT , skip)
69
+ self . flag ( raw:: GIT_MERGE_FAIL_ON_CONFLICT as u32 , skip)
70
70
}
71
71
72
72
/// If the commits being merged have multiple merge bases, do not build a
73
73
/// recursive merge base (by merging the multiple merge bases), instead
74
74
/// simply use the first base.
75
75
pub fn no_recursive ( & mut self , disable : bool ) -> & mut MergeOptions {
76
- self . flag ( raw:: GIT_MERGE_NO_RECURSIVE , disable)
76
+ self . flag ( raw:: GIT_MERGE_NO_RECURSIVE as u32 , disable)
77
77
}
78
78
79
79
/// Similarity to consider a file renamed (default 50)
@@ -106,7 +106,7 @@ impl MergeOptions {
106
106
self
107
107
}
108
108
109
- fn file_flag ( & mut self , opt : raw :: git_merge_file_flag_t , val : bool ) -> & mut MergeOptions {
109
+ fn file_flag ( & mut self , opt : u32 , val : bool ) -> & mut MergeOptions {
110
110
if val {
111
111
self . raw . file_flags |= opt;
112
112
} else {
@@ -117,42 +117,42 @@ impl MergeOptions {
117
117
118
118
/// Create standard conflicted merge files
119
119
pub fn standard_style ( & mut self , standard : bool ) -> & mut MergeOptions {
120
- self . file_flag ( raw:: GIT_MERGE_FILE_STYLE_MERGE , standard)
120
+ self . file_flag ( raw:: GIT_MERGE_FILE_STYLE_MERGE as u32 , standard)
121
121
}
122
122
123
123
/// Create diff3-style file
124
124
pub fn diff3_style ( & mut self , diff3 : bool ) -> & mut MergeOptions {
125
- self . file_flag ( raw:: GIT_MERGE_FILE_STYLE_DIFF3 , diff3)
125
+ self . file_flag ( raw:: GIT_MERGE_FILE_STYLE_DIFF3 as u32 , diff3)
126
126
}
127
127
128
128
/// Condense non-alphanumeric regions for simplified diff file
129
129
pub fn simplify_alnum ( & mut self , simplify : bool ) -> & mut MergeOptions {
130
- self . file_flag ( raw:: GIT_MERGE_FILE_SIMPLIFY_ALNUM , simplify)
130
+ self . file_flag ( raw:: GIT_MERGE_FILE_SIMPLIFY_ALNUM as u32 , simplify)
131
131
}
132
132
133
133
/// Ignore all whitespace
134
134
pub fn ignore_whitespace ( & mut self , ignore : bool ) -> & mut MergeOptions {
135
- self . file_flag ( raw:: GIT_MERGE_FILE_IGNORE_WHITESPACE , ignore)
135
+ self . file_flag ( raw:: GIT_MERGE_FILE_IGNORE_WHITESPACE as u32 , ignore)
136
136
}
137
137
138
138
/// Ignore changes in amount of whitespace
139
139
pub fn ignore_whitespace_change ( & mut self , ignore : bool ) -> & mut MergeOptions {
140
- self . file_flag ( raw:: GIT_MERGE_FILE_IGNORE_WHITESPACE_CHANGE , ignore)
140
+ self . file_flag ( raw:: GIT_MERGE_FILE_IGNORE_WHITESPACE_CHANGE as u32 , ignore)
141
141
}
142
142
143
143
/// Ignore whitespace at end of line
144
144
pub fn ignore_whitespace_eol ( & mut self , ignore : bool ) -> & mut MergeOptions {
145
- self . file_flag ( raw:: GIT_MERGE_FILE_IGNORE_WHITESPACE_EOL , ignore)
145
+ self . file_flag ( raw:: GIT_MERGE_FILE_IGNORE_WHITESPACE_EOL as u32 , ignore)
146
146
}
147
147
148
148
/// Use the "patience diff" algorithm
149
149
pub fn patience ( & mut self , patience : bool ) -> & mut MergeOptions {
150
- self . file_flag ( raw:: GIT_MERGE_FILE_DIFF_PATIENCE , patience)
150
+ self . file_flag ( raw:: GIT_MERGE_FILE_DIFF_PATIENCE as u32 , patience)
151
151
}
152
152
153
153
/// Take extra time to find minimal diff
154
154
pub fn minimal ( & mut self , minimal : bool ) -> & mut MergeOptions {
155
- self . file_flag ( raw:: GIT_MERGE_FILE_DIFF_MINIMAL , minimal)
155
+ self . file_flag ( raw:: GIT_MERGE_FILE_DIFF_MINIMAL as u32 , minimal)
156
156
}
157
157
158
158
/// Acquire a pointer to the underlying raw options.
0 commit comments