Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
ed94f549
Commit
ed94f549
authored
May 01, 2021
by
yuuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
diff:add option to ignore blank line changes
parent
cabfa3b3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
0 deletions
+8
-0
.gitignore
+1
-0
include/git2/diff.h
+4
-0
src/diff_xdiff.c
+3
-0
No files found.
.gitignore
View file @
ed94f549
...
@@ -5,3 +5,4 @@
...
@@ -5,3 +5,4 @@
/tags
/tags
CMakeSettings.json
CMakeSettings.json
.vs
.vs
.idea
include/git2/diff.h
View file @
ed94f549
...
@@ -168,6 +168,10 @@ typedef enum {
...
@@ -168,6 +168,10 @@ typedef enum {
* can apply given diff information to binary files.
* can apply given diff information to binary files.
*/
*/
GIT_DIFF_SHOW_BINARY
=
(
1u
<<
30
),
GIT_DIFF_SHOW_BINARY
=
(
1u
<<
30
),
/** Ignore blank lines */
GIT_DIFF_IGNORE_BLANK_LINES
=
(
1u
<<
31
),
}
git_diff_option_t
;
}
git_diff_option_t
;
/**
/**
...
...
src/diff_xdiff.c
View file @
ed94f549
...
@@ -259,5 +259,8 @@ void git_xdiff_init(git_xdiff_output *xo, const git_diff_options *opts)
...
@@ -259,5 +259,8 @@ void git_xdiff_init(git_xdiff_output *xo, const git_diff_options *opts)
if
(
flags
&
GIT_DIFF_MINIMAL
)
if
(
flags
&
GIT_DIFF_MINIMAL
)
xo
->
params
.
flags
|=
XDF_NEED_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
;
xo
->
callback
.
outf
=
git_xdiff_cb
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment