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
a1bf70e4
Commit
a1bf70e4
authored
Nov 08, 2012
by
Russell Belfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix regression in diff with submodule oid
parent
ad9a921b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
src/diff.c
+8
-9
No files found.
src/diff.c
View file @
a1bf70e4
...
@@ -506,16 +506,15 @@ static int maybe_modified(
...
@@ -506,16 +506,15 @@ static int maybe_modified(
/* if we got here and decided that the files are modified, but we
/* if we got here and decided that the files are modified, but we
* haven't calculated the OID of the new item, then calculate it now
* haven't calculated the OID of the new item, then calculate it now
*/
*/
if
(
status
!=
GIT_DELTA_UNMODIFIED
&&
if
(
status
!=
GIT_DELTA_UNMODIFIED
&&
git_oid_iszero
(
&
nitem
->
oid
))
{
git_oid_iszero
(
&
nitem
->
oid
)
&&
!
use_noid
)
if
(
!
use_noid
)
{
{
if
(
git_diff__oid_for_file
(
diff
->
repo
,
if
(
git_diff__oid_for_file
(
diff
->
repo
,
nitem
->
path
,
nitem
->
mode
,
nitem
->
file_size
,
&
noid
)
<
0
)
nitem
->
path
,
nitem
->
mode
,
nitem
->
file_size
,
&
noid
)
<
0
)
return
-
1
;
return
-
1
;
use_noid
=
&
noid
;
if
(
omode
==
nmode
&&
git_oid_equal
(
&
oitem
->
oid
,
&
noid
))
}
if
(
omode
==
nmode
&&
git_oid_equal
(
&
oitem
->
oid
,
use_noid
))
status
=
GIT_DELTA_UNMODIFIED
;
status
=
GIT_DELTA_UNMODIFIED
;
/* store calculated oid so we don't have to recalc later */
use_noid
=
&
noid
;
}
}
return
diff_delta__from_two
(
return
diff_delta__from_two
(
...
...
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