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
47868ee4
Commit
47868ee4
authored
2 years ago
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
repo: use `GIT_OID_DEFAULT` for default oid type
parent
db2a794d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/libgit2/repository.c
+3
-3
No files found.
src/libgit2/repository.c
View file @
47868ee4
...
...
@@ -934,7 +934,7 @@ static int obtain_config_and_set_oid_type(
if
((
error
=
load_objectformat
(
repo
,
config
))
<
0
)
goto
out
;
}
else
{
repo
->
oid_type
=
GIT_OID_
SHA1
;
repo
->
oid_type
=
GIT_OID_
DEFAULT
;
}
out
:
...
...
@@ -1804,7 +1804,7 @@ static int load_objectformat(git_repository *repo, git_config *config)
if
((
error
=
git_config_get_entry
(
&
entry
,
config
,
"extensions.objectformat"
))
<
0
)
{
if
(
error
==
GIT_ENOTFOUND
)
{
repo
->
oid_type
=
GIT_OID_
SHA1
;
repo
->
oid_type
=
GIT_OID_
DEFAULT
;
git_error_clear
();
error
=
0
;
}
...
...
@@ -2240,7 +2240,7 @@ static int repo_init_config(
SET_REPO_CONFIG
(
bool
,
"receive.denyNonFastforwards"
,
true
);
}
if
(
oid_type
!=
GIT_OID_
SHA1
)
{
if
(
oid_type
!=
GIT_OID_
DEFAULT
)
{
SET_REPO_CONFIG
(
int32
,
"core.repositoryformatversion"
,
1
);
SET_REPO_CONFIG
(
string
,
"extensions.objectformat"
,
git_oid_type_name
(
oid_type
));
}
...
...
This diff is collapsed.
Click to expand it.
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