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
4be63a68
Commit
4be63a68
authored
Dec 08, 2020
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
errors: drop unneccessary g_git prefix
parent
3a4e08a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/libgit2/errors.c
+6
-6
No files found.
src/libgit2/errors.c
View file @
4be63a68
...
...
@@ -16,12 +16,12 @@
* New error handling
********************************************/
static
git_error
g_git_
oom_error
=
{
static
git_error
oom_error
=
{
"Out of memory"
,
GIT_ERROR_NOMEMORY
};
static
git_error
g_git_
uninitialized_error
=
{
static
git_error
uninitialized_error
=
{
"libgit2 has not been initialized; you must call git_libgit2_init"
,
GIT_ERROR_INVALID
};
...
...
@@ -52,7 +52,7 @@ static void set_error(int error_class, char *string)
void
git_error_set_oom
(
void
)
{
GIT_THREADSTATE
->
last_error
=
&
g_git_
oom_error
;
GIT_THREADSTATE
->
last_error
=
&
oom_error
;
}
void
git_error_set
(
int
error_class
,
const
char
*
fmt
,
...)
...
...
@@ -134,7 +134,7 @@ const git_error *git_error_last(void)
{
/* If the library is not initialized, return a static error. */
if
(
!
git_libgit2_init_count
())
return
&
g_git_
uninitialized_error
;
return
&
uninitialized_error
;
return
GIT_THREADSTATE
->
last_error
;
}
...
...
@@ -150,13 +150,13 @@ int git_error_state_capture(git_error_state *state, int error_code)
return
0
;
state
->
error_code
=
error_code
;
state
->
oom
=
(
error
==
&
g_git_
oom_error
);
state
->
oom
=
(
error
==
&
oom_error
);
if
(
error
)
{
state
->
error_msg
.
klass
=
error
->
klass
;
if
(
state
->
oom
)
state
->
error_msg
.
message
=
g_git_
oom_error
.
message
;
state
->
error_msg
.
message
=
oom_error
.
message
;
else
state
->
error_msg
.
message
=
git_str_detach
(
error_buf
);
}
...
...
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