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
1d4dcc4b
Commit
1d4dcc4b
authored
Jun 01, 2012
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config: set an error message when asked to delete a non-existent key
parent
1835c51f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
src/config_file.c
+3
-1
No files found.
src/config_file.c
View file @
1d4dcc4b
...
@@ -443,8 +443,10 @@ static int config_delete(git_config_file *cfg, const char *name)
...
@@ -443,8 +443,10 @@ static int config_delete(git_config_file *cfg, const char *name)
pos
=
git_strmap_lookup_index
(
b
->
values
,
key
);
pos
=
git_strmap_lookup_index
(
b
->
values
,
key
);
git__free
(
key
);
git__free
(
key
);
if
(
!
git_strmap_valid_index
(
b
->
values
,
pos
))
if
(
!
git_strmap_valid_index
(
b
->
values
,
pos
))
{
giterr_set
(
GITERR_CONFIG
,
"Could not find key '%s' to delete"
,
name
);
return
GIT_ENOTFOUND
;
return
GIT_ENOTFOUND
;
}
var
=
git_strmap_value_at
(
b
->
values
,
pos
);
var
=
git_strmap_value_at
(
b
->
values
,
pos
);
...
...
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