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
7623b1b6
Commit
7623b1b6
authored
Jun 11, 2012
by
nulltoken
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
repository: make git_repository_init() value the core.logallrefupdates config entry
parent
976b69bd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
src/repository.c
+3
-0
tests-clar/repo/init.c
+6
-0
No files found.
src/repository.c
View file @
7623b1b6
...
@@ -718,6 +718,9 @@ static int repo_init_config(const char *git_dir, bool is_bare, bool is_reinit)
...
@@ -718,6 +718,9 @@ static int repo_init_config(const char *git_dir, bool is_bare, bool is_reinit)
SET_REPO_CONFIG
(
int32
,
"core.repositoryformatversion"
,
GIT_REPO_VERSION
);
SET_REPO_CONFIG
(
int32
,
"core.repositoryformatversion"
,
GIT_REPO_VERSION
);
SET_REPO_CONFIG
(
bool
,
"core.filemode"
,
is_chmod_supported
(
git_buf_cstr
(
&
cfg_path
)));
SET_REPO_CONFIG
(
bool
,
"core.filemode"
,
is_chmod_supported
(
git_buf_cstr
(
&
cfg_path
)));
if
(
!
is_bare
)
SET_REPO_CONFIG
(
bool
,
"core.logallrefupdates"
,
true
);
if
(
!
is_reinit
&&
is_filesystem_case_insensitive
(
git_dir
))
if
(
!
is_reinit
&&
is_filesystem_case_insensitive
(
git_dir
))
SET_REPO_CONFIG
(
bool
,
"core.ignorecase"
,
true
);
SET_REPO_CONFIG
(
bool
,
"core.ignorecase"
,
true
);
/* TODO: what other defaults? */
/* TODO: what other defaults? */
...
...
tests-clar/repo/init.c
View file @
7623b1b6
...
@@ -241,3 +241,9 @@ void test_repo_init__reinit_doesnot_overwrite_ignorecase(void)
...
@@ -241,3 +241,9 @@ void test_repo_init__reinit_doesnot_overwrite_ignorecase(void)
git_config_free
(
config
);
git_config_free
(
config
);
}
}
void
test_repo_init__sets_logAllRefUpdates_according_to_type_of_repository
(
void
)
{
assert_config_entry_on_init_bytype
(
"core.logallrefupdates"
,
GIT_ENOTFOUND
,
true
);
assert_config_entry_on_init_bytype
(
"core.logallrefupdates"
,
true
,
false
);
}
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