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
82ae6fcd
Commit
82ae6fcd
authored
Aug 08, 2013
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config: compilation fixes
parent
4d588d97
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
src/config.h
+2
-2
src/config_file.c
+9
-10
No files found.
src/config.h
View file @
82ae6fcd
...
...
@@ -24,10 +24,10 @@ struct git_config {
git_vector
files
;
};
typedef
struct
{
struct
git_config_backend_iter
{
git_config_backend
*
backend
;
unsigned
int
flags
;
}
git_config_backend_iter
;
};
extern
int
git_config_find_global_r
(
git_buf
*
global_config_path
);
extern
int
git_config_find_xdg_r
(
git_buf
*
system_config_path
);
...
...
src/config_file.c
View file @
82ae6fcd
...
...
@@ -28,8 +28,7 @@ typedef struct cvar_t {
}
cvar_t
;
typedef
struct
git_config_file_iter
{
git_config_backend
*
backend
;
unsigned
int
flags
;
git_config_backend_iter
parent
;
git_strmap_iter
iter
;
cvar_t
*
next
;
}
git_config_file_iter
;
...
...
@@ -260,17 +259,17 @@ static int config_iterator_new(
struct
git_config_backend
*
backend
)
{
diskfile_backend
*
b
=
(
diskfile_backend
*
)
backend
;
git_config_file_iter
*
*
it
=
((
git_config_file_iter
**
)
iter
);
git_config_file_iter
*
it
=
git__calloc
(
1
,
sizeof
(
git_config_file_iter
)
);
if
(
!
b
->
values
||
git_strmap_num_entries
(
b
->
values
)
<
1
)
return
-
1
;
*
it
=
git__calloc
(
1
,
sizeof
(
git_config_file_iter
));
GITERR_CHECK_ALLOC
(
it
);
(
*
it
)
->
backend
=
backend
;
(
*
it
)
->
iter
=
git_strmap_begin
(
b
->
values
);
(
*
it
)
->
next
=
NULL
;
it
->
parent
.
backend
=
backend
;
it
->
iter
=
git_strmap_begin
(
b
->
values
);
it
->
next
=
NULL
;
*
iter
=
(
git_config_backend_iter
*
)
it
;
return
0
;
}
...
...
@@ -285,9 +284,9 @@ static int config_iterator_next(
git_config_entry
*
entry
,
git_config_backend_iter
*
iter
)
{
git_config_file_iter
*
it
=
*
((
git_config_file_iter
**
)
iter
)
;
diskfile_backend
*
b
=
(
diskfile_backend
*
)
it
->
backend
;
int
err
;
git_config_file_iter
*
it
=
(
git_config_file_iter
*
)
iter
;
diskfile_backend
*
b
=
(
diskfile_backend
*
)
it
->
parent
.
backend
;
int
err
=
0
;
cvar_t
*
var
;
const
char
*
key
;
...
...
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