merge: rename flag helper to file_flag
This matches the field it modifies more closely as there is another field called
`flags`.
@@ -86,7 +86,7 @@ impl MergeOptions {
self
}
- fn flag(&mut self, opt: raw::git_merge_file_flag_t, val: bool) -> &mut MergeOptions {
+ fn file_flag(&mut self, opt: raw::git_merge_file_flag_t, val: bool) -> &mut MergeOptions {
if val {
self.raw.file_flags |= opt;
} else {
@@ -97,42 +97,42 @@ impl MergeOptions {
/// Create standard conflicted merge files
pub fn standard_style(&mut self, standard: bool) -> &mut MergeOptions {
- self.flag(raw::GIT_MERGE_FILE_STYLE_MERGE, standard)
+ self.file_flag(raw::GIT_MERGE_FILE_STYLE_MERGE, standard)
}
/// Create diff3-style file
pub fn diff3_style(&mut self, diff3: bool) -> &mut MergeOptions {
- self.flag(raw::GIT_MERGE_FILE_STYLE_DIFF3, diff3)
+ self.file_flag(raw::GIT_MERGE_FILE_STYLE_DIFF3, diff3)
}
/// Condense non-alphanumeric regions for simplified diff file
pub fn simplify_alnum(&mut self, simplify: bool) -> &mut MergeOptions {
- self.flag(raw::GIT_MERGE_FILE_SIMPLIFY_ALNUM, simplify)
+ self.file_flag(raw::GIT_MERGE_FILE_SIMPLIFY_ALNUM, simplify)
}
/// Ignore all whitespace
pub fn ignore_whitespace(&mut self, ignore: bool) -> &mut MergeOptions {
- self.flag(raw::GIT_MERGE_FILE_IGNORE_WHITESPACE, ignore)
+ self.file_flag(raw::GIT_MERGE_FILE_IGNORE_WHITESPACE, ignore)
}
/// Ignore changes in amount of whitespace
pub fn ignore_whitespace_change(&mut self, ignore: bool) -> &mut MergeOptions {
- self.flag(raw::GIT_MERGE_FILE_IGNORE_WHITESPACE_CHANGE, ignore)
+ self.file_flag(raw::GIT_MERGE_FILE_IGNORE_WHITESPACE_CHANGE, ignore)
}
/// Ignore whitespace at end of line
pub fn ignore_whitespace_eol(&mut self, ignore: bool) -> &mut MergeOptions {
- self.flag(raw::GIT_MERGE_FILE_IGNORE_WHITESPACE_EOL, ignore)
+ self.file_flag(raw::GIT_MERGE_FILE_IGNORE_WHITESPACE_EOL, ignore)
}
/// Use the "patience diff" algorithm
pub fn patience(&mut self, patience: bool) -> &mut MergeOptions {
- self.flag(raw::GIT_MERGE_FILE_DIFF_PATIENCE, patience)
+ self.file_flag(raw::GIT_MERGE_FILE_DIFF_PATIENCE, patience)
}
/// Take extra time to find minimal diff
pub fn minimal(&mut self, minimal: bool) -> &mut MergeOptions {
- self.flag(raw::GIT_MERGE_FILE_DIFF_MINIMAL, minimal)
+ self.file_flag(raw::GIT_MERGE_FILE_DIFF_MINIMAL, minimal)
}
/// Acquire a pointer to the underlying raw options.
