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
1bdba338
Commit
1bdba338
authored
Dec 20, 2011
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #514 from schu/fix-warning-uninitialized
config_file: honor error
parents
be00b00d
e95849c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
src/config_file.c
+6
-3
No files found.
src/config_file.c
View file @
1bdba338
...
...
@@ -406,7 +406,8 @@ static int config_get(git_config_file *cfg, const char *name, const char **out)
static
int
config_delete
(
git_config_file
*
cfg
,
const
char
*
name
)
{
cvar_t
*
iter
,
*
prev
;
int
error
;
cvar_t
*
iter
,
*
prev
=
NULL
;
diskfile_backend
*
b
=
(
diskfile_backend
*
)
cfg
;
CVAR_LIST_FOREACH
(
&
b
->
var_list
,
iter
)
{
...
...
@@ -419,9 +420,11 @@ static int config_delete(git_config_file *cfg, const char *name)
git__free
(
iter
->
value
);
iter
->
value
=
NULL
;
config_write
(
b
,
iter
);
error
=
config_write
(
b
,
iter
);
cvar_free
(
iter
);
return
GIT_SUCCESS
;
return
error
==
GIT_SUCCESS
?
GIT_SUCCESS
:
git__rethrow
(
error
,
"Failed to update config file"
);
}
/* Store it for the next round */
prev
=
iter
;
...
...
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