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
39b1ad7f
Commit
39b1ad7f
authored
Nov 05, 2013
by
nulltoken
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Plug configuration file search paths leaks
parent
74e06c05
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
1 deletions
+16
-1
src/fileops.c
+1
-1
src/fileops.h
+5
-0
tests-clar/repo/config.c
+8
-0
tests-clar/repo/open.c
+2
-0
No files found.
src/fileops.c
View file @
39b1ad7f
...
...
@@ -618,7 +618,7 @@ static git_futils_dirs_guess_cb git_futils__dir_guess[GIT_FUTILS_DIR__MAX] = {
git_futils_guess_template_dirs
,
};
static
void
git_futils_dirs_global_shutdown
(
void
)
void
git_futils_dirs_global_shutdown
(
void
)
{
int
i
;
for
(
i
=
0
;
i
<
GIT_FUTILS_DIR__MAX
;
++
i
)
...
...
src/fileops.h
View file @
39b1ad7f
...
...
@@ -399,4 +399,9 @@ extern int git_futils_filestamp_check(
extern
void
git_futils_filestamp_set
(
git_futils_filestamp
*
tgt
,
const
git_futils_filestamp
*
src
);
/**
* Free the configuration file search paths.
*/
extern
void
git_futils_dirs_global_shutdown
(
void
);
#endif
/* INCLUDE_fileops_h__ */
tests-clar/repo/config.c
View file @
39b1ad7f
...
...
@@ -46,6 +46,8 @@ void test_repo_config__open_missing_global(void)
git_config_free
(
global
);
git_config_free
(
config
);
git_repository_free
(
repo
);
git_futils_dirs_global_shutdown
();
}
void
test_repo_config__open_missing_global_with_separators
(
void
)
...
...
@@ -73,6 +75,8 @@ void test_repo_config__open_missing_global_with_separators(void)
git_config_free
(
global
);
git_config_free
(
config
);
git_repository_free
(
repo
);
git_futils_dirs_global_shutdown
();
}
#include "repository.h"
...
...
@@ -101,6 +105,8 @@ void test_repo_config__read_no_configs(void)
cl_assert_equal_i
(
GIT_ABBREV_DEFAULT
,
val
);
git_repository_free
(
repo
);
git_futils_dirs_global_shutdown
();
/* with just system */
cl_must_pass
(
p_mkdir
(
"alternate/1"
,
0777
));
...
...
@@ -197,4 +203,6 @@ void test_repo_config__read_no_configs(void)
cl_assert
(
!
git_path_exists
(
"empty_standard_repo/.git/config"
));
cl_assert
(
!
git_path_exists
(
"alternate/3/.gitconfig"
));
git_futils_dirs_global_shutdown
();
}
tests-clar/repo/open.c
View file @
39b1ad7f
...
...
@@ -322,6 +322,8 @@ void test_repo_open__no_config(void)
git_config_free
(
config
);
git_repository_free
(
repo
);
cl_fixture_cleanup
(
"empty_standard_repo"
);
git_futils_dirs_global_shutdown
();
}
void
test_repo_open__force_bare
(
void
)
...
...
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