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
55f9837f
Commit
55f9837f
authored
Nov 09, 2012
by
nulltoken
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config: make git_config_open_level() work with an empty config
parent
0f674411
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
src/config.c
+0
-2
tests-clar/config/configlevel.c
+13
-0
No files found.
src/config.c
View file @
55f9837f
...
...
@@ -127,8 +127,6 @@ static int find_internal_file_by_level(
file_internal
*
internal
;
unsigned
int
i
;
assert
(
cfg
->
files
.
length
);
/* when passing GIT_CONFIG_HIGHEST_LEVEL, the idea is to get the config file
* which has the highest level. As config files are stored in a vector
* sorted by decreasing order of level, getting the file at position 0
...
...
tests-clar/config/configlevel.c
View file @
55f9837f
...
...
@@ -57,3 +57,16 @@ void test_config_configlevel__can_read_from_a_single_level_focused_file_after_pa
git_config_free
(
single_level_cfg
);
}
void
test_config_configlevel__fetching_a_level_from_an_empty_compound_config_returns_ENOTFOUND
(
void
)
{
git_config
*
cfg
;
git_config
*
local_cfg
;
const
char
*
s
;
cl_git_pass
(
git_config_new
(
&
cfg
));
cl_assert_equal_i
(
GIT_ENOTFOUND
,
git_config_open_level
(
&
local_cfg
,
cfg
,
GIT_CONFIG_LEVEL_LOCAL
));
git_config_free
(
cfg
);
}
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