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
15e42fb5
Unverified
Commit
15e42fb5
authored
Jul 15, 2023
by
Edward Thomson
Committed by
GitHub
Jul 15, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6585 from libgit2/cmn/midx-no-oid-verify
midx: do not try to look at every object in the index
parents
40ed228b
c1aa0213
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
9 deletions
+1
-9
src/libgit2/midx.c
+1
-9
No files found.
src/libgit2/midx.c
View file @
15e42fb5
...
...
@@ -114,8 +114,6 @@ static int midx_parse_oid_lookup(
const
unsigned
char
*
data
,
struct
git_midx_chunk
*
chunk_oid_lookup
)
{
uint32_t
i
;
unsigned
char
*
oid
,
*
prev_oid
,
zero_oid
[
GIT_OID_MAX_SIZE
]
=
{
0
};
size_t
oid_size
=
git_oid_size
(
idx
->
oid_type
);
if
(
chunk_oid_lookup
->
offset
==
0
)
...
...
@@ -125,13 +123,7 @@ static int midx_parse_oid_lookup(
if
(
chunk_oid_lookup
->
length
!=
idx
->
num_objects
*
oid_size
)
return
midx_error
(
"OID Lookup chunk has wrong length"
);
idx
->
oid_lookup
=
oid
=
(
unsigned
char
*
)(
data
+
chunk_oid_lookup
->
offset
);
prev_oid
=
zero_oid
;
for
(
i
=
0
;
i
<
idx
->
num_objects
;
++
i
,
oid
+=
oid_size
)
{
if
(
git_oid_raw_cmp
(
prev_oid
,
oid
,
oid_size
)
>=
0
)
return
midx_error
(
"OID Lookup index is non-monotonic"
);
prev_oid
=
oid
;
}
idx
->
oid_lookup
=
(
unsigned
char
*
)(
data
+
chunk_oid_lookup
->
offset
);
return
0
;
}
...
...
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