diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2023-04-08 20:32:10 +0100 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2023-04-10 14:21:16 +0100 |
commit | 47868ee45bc1f8680288caebec5a0443bceda12d (patch) | |
tree | df97f86d8ead64f08ea8a8d2048d191a1166f16d /src | |
parent | db2a794dda2b6f92291b3758507f863f39314c72 (diff) | |
download | libgit2-47868ee45bc1f8680288caebec5a0443bceda12d.tar.gz |
repo: use `GIT_OID_DEFAULT` for default oid type
Diffstat (limited to 'src')
-rw-r--r-- | src/libgit2/repository.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libgit2/repository.c b/src/libgit2/repository.c index 4bf92dcdc..804e436ab 100644 --- a/src/libgit2/repository.c +++ b/src/libgit2/repository.c @@ -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)); } |