diff options
| author | Josh Bleecher Snyder <[email protected]> | 2018-01-25 16:43:27 -0800 |
|---|---|---|
| committer | Josh Bleecher Snyder <[email protected]> | 2018-01-25 16:55:42 -0800 |
| commit | 9de57cc90ef4e3d778613ad9eec35dfb9b6b21b2 (patch) | |
| tree | c205b910d6b2a1086c707e03a005e1a7b6ea494a | |
| parent | 432a164805a43a5ee0df15f7939dc771fc8d4fbd (diff) | |
merge: add missing MergeFileFlag constants
While we're here, pull in comments as well.
While one can pop back and forth between godoc and libgit2 refs,
it's much nicer to have it in one place.
Note that MergeFileStyleSimplifyAlnum probably should have been called
merely MergeFileSimplifyAlnum (no "Style"). It's probably not worth
breaking backwards compatibility to fix it, but we avoid the mistake
going forwards.
| -rw-r--r-- | merge.go | 24 |
1 files changed, 22 insertions, 2 deletions
@@ -344,9 +344,29 @@ type MergeFileFlags int const ( MergeFileDefault MergeFileFlags = C.GIT_MERGE_FILE_DEFAULT - MergeFileStyleMerge MergeFileFlags = C.GIT_MERGE_FILE_STYLE_MERGE - MergeFileStyleDiff MergeFileFlags = C.GIT_MERGE_FILE_STYLE_DIFF3 + // Create standard conflicted merge files + MergeFileStyleMerge MergeFileFlags = C.GIT_MERGE_FILE_STYLE_MERGE + + // Create diff3-style files + MergeFileStyleDiff MergeFileFlags = C.GIT_MERGE_FILE_STYLE_DIFF3 + + // Condense non-alphanumeric regions for simplified diff file MergeFileStyleSimplifyAlnum MergeFileFlags = C.GIT_MERGE_FILE_SIMPLIFY_ALNUM + + // Ignore all whitespace + MergeFileIgnoreWhitespace MergeFileFlags = C.GIT_MERGE_FILE_IGNORE_WHITESPACE + + // Ignore changes in amount of whitespace + MergeFileIgnoreWhitespaceChange MergeFileFlags = C.GIT_MERGE_FILE_IGNORE_WHITESPACE_CHANGE + + // Ignore whitespace at end of line + MergeFileIgnoreWhitespaceEOL MergeFileFlags = C.GIT_MERGE_FILE_IGNORE_WHITESPACE_EOL + + // Use the "patience diff" algorithm + MergeFileDiffPatience MergeFileFlags = C.GIT_MERGE_FILE_DIFF_PATIENCE + + // Take extra time to find minimal diff + MergeFileDiffMinimal MergeFileFlags = C.GIT_MERGE_FILE_DIFF_MINIMAL ) type MergeFileOptions struct { |
