mirror of
https://github.com/libgit2/libgit2.git
synced 2026-01-25 02:56:17 +00:00
diff:add option to ignore blank line changes
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,3 +5,4 @@
|
||||
/tags
|
||||
CMakeSettings.json
|
||||
.vs
|
||||
.idea
|
||||
|
||||
@@ -168,6 +168,10 @@ typedef enum {
|
||||
* can apply given diff information to binary files.
|
||||
*/
|
||||
GIT_DIFF_SHOW_BINARY = (1u << 30),
|
||||
|
||||
/** Ignore blank lines */
|
||||
GIT_DIFF_IGNORE_BLANK_LINES = (1u << 31),
|
||||
|
||||
} git_diff_option_t;
|
||||
|
||||
/**
|
||||
|
||||
@@ -259,5 +259,8 @@ void git_xdiff_init(git_xdiff_output *xo, const git_diff_options *opts)
|
||||
if (flags & GIT_DIFF_MINIMAL)
|
||||
xo->params.flags |= XDF_NEED_MINIMAL;
|
||||
|
||||
if (flags & GIT_DIFF_IGNORE_BLANK_LINES)
|
||||
xo->params.flags |= XDF_IGNORE_BLANK_LINES;
|
||||
|
||||
xo->callback.outf = git_xdiff_cb;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user