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
4c7a5e9e
Commit
4c7a5e9e
authored
May 23, 2011
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit: Reword errors
parent
726c6fd2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
src/commit.c
+4
-9
No files found.
src/commit.c
View file @
4c7a5e9e
...
...
@@ -103,8 +103,6 @@ int git_commit_create_v(
free
((
void
*
)
oids
);
if
(
error
<
GIT_SUCCESS
)
return
git__rethrow
(
error
,
"Failed to create commit"
);
return
error
;
}
...
...
@@ -137,8 +135,6 @@ int git_commit_create_ov(
free
((
void
*
)
oids
);
if
(
error
<
GIT_SUCCESS
)
return
git__rethrow
(
error
,
"Failed to create commit"
);
return
error
;
}
...
...
@@ -168,8 +164,6 @@ int git_commit_create_o(
free
((
void
*
)
oids
);
if
(
error
<
GIT_SUCCESS
)
return
git__rethrow
(
error
,
"Failed to create commit"
);
return
error
;
}
...
...
@@ -197,7 +191,7 @@ int git_commit_create(
committer_length
=
git_signature__write
(
&
committer_str
,
"committer"
,
committer
);
if
(
author_length
<
0
||
committer_length
<
0
)
return
GIT_ENOMEM
;
return
git__throw
(
GIT_EINVALIDARGS
,
"Cannot create commit. Failed to parse signature"
)
;
final_size
+=
GIT_OID_LINE_LENGTH
(
"tree"
);
final_size
+=
GIT_OID_LINE_LENGTH
(
"parent"
)
*
parent_count
;
...
...
@@ -252,7 +246,8 @@ int git_commit_create(
if
(
error
<
GIT_SUCCESS
)
return
git__rethrow
(
error
,
"Failed to create commit"
);
return
error
;
return
GIT_SUCCESS
;
}
int
commit_parse_buffer
(
git_commit
*
commit
,
const
void
*
data
,
size_t
len
)
...
...
@@ -354,7 +349,7 @@ int git_commit_parent(git_commit **parent, git_commit *commit, unsigned int n)
parent_oid
=
git_vector_get
(
&
commit
->
parent_oids
,
n
);
if
(
parent_oid
==
NULL
)
return
git__throw
(
GIT_ENOTFOUND
,
"
Failed to get parent. Parent does not exist"
);
return
git__throw
(
GIT_ENOTFOUND
,
"
Parent %u does not exist"
,
n
);
return
git_commit_lookup
(
parent
,
commit
->
object
.
repo
,
parent_oid
);
}
...
...
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