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
2ea14da6
Commit
2ea14da6
authored
Dec 15, 2011
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config: Return ENOTFOUND when a variable was deleted
parent
bc57b80b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
src/config_file.c
+2
-4
No files found.
src/config_file.c
View file @
2ea14da6
...
...
@@ -391,17 +391,15 @@ static int config_set(git_config_file *cfg, const char *name, const char *value)
static
int
config_get
(
git_config_file
*
cfg
,
const
char
*
name
,
const
char
**
out
)
{
cvar_t
*
var
;
int
error
=
GIT_SUCCESS
;
diskfile_backend
*
b
=
(
diskfile_backend
*
)
cfg
;
var
=
cvar_list_find
(
&
b
->
var_list
,
name
);
if
(
var
==
NULL
)
if
(
var
==
NULL
||
var
->
value
==
NULL
)
return
git__throw
(
GIT_ENOTFOUND
,
"Variable '%s' not found"
,
name
);
*
out
=
var
->
value
;
return
error
==
GIT_SUCCESS
?
GIT_SUCCESS
:
git__rethrow
(
error
,
"Failed to get config value for %s"
,
name
);
return
GIT_SUCCESS
;
}
int
git_config_file__ondisk
(
git_config_file
**
out
,
const
char
*
path
)
...
...
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