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
4a0c7f56
Commit
4a0c7f56
authored
Nov 15, 2012
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1074 from edubart/ignore_diff_filemode
Add option to ignore file mode in diffs
parents
63f7c6f4
c0d5acf6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
include/git2/diff.h
+2
-0
src/diff.c
+3
-0
No files found.
include/git2/diff.h
View file @
4a0c7f56
...
...
@@ -86,6 +86,8 @@ typedef enum {
* mode set to tree. Note: the tree SHA will not be available.
*/
GIT_DIFF_INCLUDE_TYPECHANGE_TREES
=
(
1
<<
16
),
/** Ignore file mode changes */
GIT_DIFF_IGNORE_FILEMODE
=
(
1
<<
17
),
}
git_diff_option_t
;
/**
...
...
src/diff.c
View file @
4a0c7f56
...
...
@@ -267,6 +267,9 @@ static git_diff_list *git_diff_list_alloc(
memcpy
(
&
diff
->
opts
,
opts
,
sizeof
(
git_diff_options
));
if
(
opts
->
flags
&
GIT_DIFF_IGNORE_FILEMODE
)
diff
->
diffcaps
=
diff
->
diffcaps
&
~
GIT_DIFFCAPS_TRUST_MODE_BITS
;
/* pathspec init will do nothing for empty pathspec */
if
(
git_pathspec_init
(
&
diff
->
pathspec
,
&
opts
->
pathspec
,
&
diff
->
pool
)
<
0
)
goto
fail
;
...
...
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