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
60e1b49a
Commit
60e1b49a
authored
May 23, 2011
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
odb_loose: Reword errors
parent
dfb12cd5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
src/odb_loose.c
+9
-2
No files found.
src/odb_loose.c
View file @
60e1b49a
...
...
@@ -452,7 +452,11 @@ static int read_header_loose(git_rawobj *out, const char *loc)
cleanup:
finish_inflate
(
&
zs
);
gitfo_close
(
fd
);
return
error
==
GIT_SUCCESS
?
GIT_SUCCESS
:
git__rethrow
(
error
,
"Failed to read loose object header"
);
if
(
error
<
GIT_SUCCESS
)
return
git__throw
(
error
,
"Failed to read loose object header. Header is corrupted"
);
return
GIT_SUCCESS
;
}
static
int
locate_object
(
char
*
object_location
,
loose_backend
*
backend
,
const
git_oid
*
oid
)
...
...
@@ -485,11 +489,14 @@ int loose_backend__read_header(size_t *len_p, git_otype *type_p, git_odb_backend
assert
(
backend
&&
oid
);
raw
.
len
=
0
;
raw
.
type
=
GIT_OBJ_BAD
;
if
(
locate_object
(
object_path
,
(
loose_backend
*
)
backend
,
oid
)
<
0
)
return
git__throw
(
GIT_ENOTFOUND
,
"Failed to read loose backend header. Object not found"
);
if
((
error
=
read_header_loose
(
&
raw
,
object_path
))
<
GIT_SUCCESS
)
return
git__rethrow
(
error
,
"Failed to read loose backend header"
)
;
return
error
;
*
len_p
=
raw
.
len
;
*
type_p
=
raw
.
type
;
...
...
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