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
d19dd9cf
Commit
d19dd9cf
authored
Aug 18, 2013
by
nulltoken
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
odb: Straighten oid prefix handling
parent
51a5e133
Hide 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 @
d19dd9cf
...
@@ -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