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
46365f68
Commit
46365f68
authored
Apr 05, 2023
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
odb_pack: handle sha256 short lookups
parent
c0178ef3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
src/libgit2/odb_pack.c
+7
-1
No files found.
src/libgit2/odb_pack.c
View file @
46365f68
...
@@ -309,11 +309,17 @@ static int pack_entry_find_prefix(
...
@@ -309,11 +309,17 @@ static int pack_entry_find_prefix(
{
{
int
error
;
int
error
;
size_t
i
;
size_t
i
;
git_oid
found_full_oid
=
GIT_OID_SHA1_ZERO
;
git_oid
found_full_oid
;
bool
found
=
false
;
bool
found
=
false
;
struct
git_pack_file
*
last_found
=
backend
->
last_found
,
*
p
;
struct
git_pack_file
*
last_found
=
backend
->
last_found
,
*
p
;
git_midx_entry
midx_entry
;
git_midx_entry
midx_entry
;
#ifdef GIT_EXPERIMENTAL_SHA256
git_oid_clear
(
&
found_full_oid
,
short_oid
->
type
);
#else
git_oid_clear
(
&
found_full_oid
,
GIT_OID_SHA1
);
#endif
if
(
backend
->
midx
)
{
if
(
backend
->
midx
)
{
error
=
git_midx_entry_find
(
&
midx_entry
,
backend
->
midx
,
short_oid
,
len
);
error
=
git_midx_entry_find
(
&
midx_entry
,
backend
->
midx
,
short_oid
,
len
);
if
(
error
==
GIT_EAMBIGUOUS
)
if
(
error
==
GIT_EAMBIGUOUS
)
...
...
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