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
674875dc
Unverified
Commit
674875dc
authored
Jan 15, 2021
by
Edward Thomson
Committed by
GitHub
Jan 15, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5768 from lhchavez/midx-needs-refresh
midx: Fix a bug in `git_midx_needs_refresh()`
parents
487f2a82
d50d3db6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletions
+2
-1
src/midx.c
+1
-1
tests/pack/midx.c
+1
-0
No files found.
src/midx.c
View file @
674875dc
...
@@ -359,7 +359,7 @@ bool git_midx_needs_refresh(
...
@@ -359,7 +359,7 @@ bool git_midx_needs_refresh(
if
(
bytes_read
!=
GIT_OID_RAWSZ
)
if
(
bytes_read
!=
GIT_OID_RAWSZ
)
return
true
;
return
true
;
return
git_oid_cmp
(
&
idx_checksum
,
&
idx
->
checksum
)
==
0
;
return
!
git_oid_equal
(
&
idx_checksum
,
&
idx
->
checksum
)
;
}
}
int
git_midx_entry_find
(
int
git_midx_entry_find
(
...
...
tests/pack/midx.c
View file @
674875dc
...
@@ -15,6 +15,7 @@ void test_pack_midx__parse(void)
...
@@ -15,6 +15,7 @@ void test_pack_midx__parse(void)
cl_git_pass
(
git_repository_open
(
&
repo
,
cl_fixture
(
"testrepo.git"
)));
cl_git_pass
(
git_repository_open
(
&
repo
,
cl_fixture
(
"testrepo.git"
)));
cl_git_pass
(
git_buf_joinpath
(
&
midx_path
,
git_repository_path
(
repo
),
"objects/pack/multi-pack-index"
));
cl_git_pass
(
git_buf_joinpath
(
&
midx_path
,
git_repository_path
(
repo
),
"objects/pack/multi-pack-index"
));
cl_git_pass
(
git_midx_open
(
&
idx
,
git_buf_cstr
(
&
midx_path
)));
cl_git_pass
(
git_midx_open
(
&
idx
,
git_buf_cstr
(
&
midx_path
)));
cl_assert_equal_i
(
git_midx_needs_refresh
(
idx
,
git_buf_cstr
(
&
midx_path
)),
0
);
cl_git_pass
(
git_oid_fromstr
(
&
id
,
"5001298e0c09ad9c34e4249bc5801c75e9754fa5"
));
cl_git_pass
(
git_oid_fromstr
(
&
id
,
"5001298e0c09ad9c34e4249bc5801c75e9754fa5"
));
cl_git_pass
(
git_midx_entry_find
(
&
e
,
idx
,
&
id
,
GIT_OID_HEXSZ
));
cl_git_pass
(
git_midx_entry_find
(
&
e
,
idx
,
&
id
,
GIT_OID_HEXSZ
));
...
...
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