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
ec9edd56
Commit
ec9edd56
authored
May 19, 2011
by
Jakob Pfender
Committed by
Vicent Marti
May 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config_file.c: Move to new error handling mechanism
parent
a6d647d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/config_file.c
+5
-5
No files found.
src/config_file.c
View file @
ec9edd56
...
...
@@ -263,7 +263,7 @@ static int config_open(git_config_file *cfg)
gitfo_free_buf
(
&
b
->
reader
.
buffer
);
free
(
cfg
);
return
error
;
return
git__rethrow
(
error
,
"Failed to open config"
)
;
}
static
void
backend_free
(
git_config_file
*
_backend
)
...
...
@@ -363,7 +363,7 @@ static int config_set(git_config_file *cfg, const char *name, const char *value)
if
(
error
<
GIT_SUCCESS
)
cvar_free
(
var
);
return
error
;
return
error
==
GIT_SUCCESS
?
GIT_SUCCESS
:
git__rethrow
(
error
,
"Failed to set config value"
)
;
}
/*
...
...
@@ -382,7 +382,7 @@ static int config_get(git_config_file *cfg, const char *name, const char **out)
*
out
=
var
->
value
;
return
error
;
return
error
==
GIT_SUCCESS
?
GIT_SUCCESS
:
git__rethrow
(
error
,
"Failed to get config value for %s"
,
name
)
;
}
int
git_config_file__ondisk
(
git_config_file
**
out
,
const
char
*
path
)
...
...
@@ -711,7 +711,7 @@ static int parse_section_header(diskfile_backend *cfg, char **section_out)
error
=
parse_section_header_ext
(
line
,
name
,
section_out
);
free
(
line
);
free
(
name
);
return
error
;
return
error
==
GIT_SUCCESS
?
GIT_SUCCESS
:
git__rethrow
(
error
,
"Failed to parse header"
)
;
}
if
(
!
config_keychar
(
c
)
&&
c
!=
'.'
)
{
...
...
@@ -874,7 +874,7 @@ static int config_parse(diskfile_backend *cfg_file)
if
(
current_section
)
free
(
current_section
);
return
error
;
return
error
==
GIT_SUCCESS
?
GIT_SUCCESS
:
git__rethrow
(
error
,
"Failed to parse config"
)
;
}
static
int
is_multiline_var
(
const
char
*
str
)
...
...
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