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
1c1b4e8a
Commit
1c1b4e8a
authored
Aug 19, 2013
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1792 from libgit2/ntk/bug/prefix_size
odb: Straighten oid prefix handling
parents
9abf7ea7
d19dd9cf
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
src/odb_loose.c
+3
-1
No files found.
src/odb_loose.c
View file @
1c1b4e8a
...
@@ -641,10 +641,12 @@ static int loose_backend__read_prefix(
...
@@ -641,10 +641,12 @@ static int loose_backend__read_prefix(
{
{
int
error
=
0
;
int
error
=
0
;
assert
(
len
<=
GIT_OID_HEXSZ
);
if
(
len
<
GIT_OID_MINPREFIXLEN
)
if
(
len
<
GIT_OID_MINPREFIXLEN
)
error
=
git_odb__error_ambiguous
(
"prefix length too short"
);
error
=
git_odb__error_ambiguous
(
"prefix length too short"
);
else
if
(
len
>
=
GIT_OID_HEXSZ
)
{
else
if
(
len
=
=
GIT_OID_HEXSZ
)
{
/* We can fall back to regular read method */
/* We can fall back to regular read method */
error
=
loose_backend__read
(
buffer_p
,
len_p
,
type_p
,
backend
,
short_oid
);
error
=
loose_backend__read
(
buffer_p
,
len_p
,
type_p
,
backend
,
short_oid
);
if
(
!
error
)
if
(
!
error
)
...
...
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