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
a5bf599c
Commit
a5bf599c
authored
Apr 17, 2015
by
Edward Thomson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3047 from git-up/diff_fixes
Diff fixes
parents
c694f9fa
db853748
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
src/diff.c
+7
-10
No files found.
src/diff.c
View file @
a5bf599c
...
...
@@ -621,7 +621,7 @@ int git_diff__oid_for_entry(
git_index
*
idx
;
if
(
!
(
error
=
git_repository_index__weakptr
(
&
idx
,
diff
->
repo
)))
{
memcpy
(
&
entry
.
id
,
out
,
sizeof
(
entry
.
id
)
);
git_oid_cpy
(
&
entry
.
id
,
out
);
error
=
git_index_add
(
idx
,
&
entry
);
}
}
...
...
@@ -806,15 +806,12 @@ static int maybe_modified(
* haven't calculated the OID of the new item, then calculate it now
*/
if
(
modified_uncertain
&&
git_oid_iszero
(
&
nitem
->
id
))
{
if
(
git_oid_iszero
(
&
noid
))
{
const
git_oid
*
update_check
=
DIFF_FLAG_IS_SET
(
diff
,
GIT_DIFF_UPDATE_INDEX
)
?
&
oitem
->
id
:
NULL
;
if
((
error
=
git_diff__oid_for_entry
(
&
noid
,
diff
,
nitem
,
update_check
))
<
0
)
return
error
;
}
const
git_oid
*
update_check
=
DIFF_FLAG_IS_SET
(
diff
,
GIT_DIFF_UPDATE_INDEX
)
&&
omode
==
nmode
?
&
oitem
->
id
:
NULL
;
if
((
error
=
git_diff__oid_for_entry
(
&
noid
,
diff
,
nitem
,
update_check
))
<
0
)
return
error
;
/* if oid matches, then mark unmodified (except submodules, where
* the filesystem content may be modified even if the oid still
...
...
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