mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 10:03:43 +00:00
repository: default to core.bare = false if it's not set
We used to consider a missing core.bare option to mean that the repository was corrupt. This is too strict. Consider it a non-bare repository if it's not set.
This commit is contained in:
parent
7eeec8f22d
commit
d3e9c4a5fc
@ -124,11 +124,12 @@ static int load_config_data(git_repository *repo)
|
|||||||
if (git_repository_config__weakptr(&config, repo) < 0)
|
if (git_repository_config__weakptr(&config, repo) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
/* Try to figure out if it's bare, default to non-bare if it's not set */
|
||||||
if (git_config_get_bool(&is_bare, config, "core.bare") < 0)
|
if (git_config_get_bool(&is_bare, config, "core.bare") < 0)
|
||||||
return -1; /* FIXME: We assume that a missing core.bare
|
repo->is_bare = 0;
|
||||||
variable is an error. Is this right? */
|
else
|
||||||
|
repo->is_bare = is_bare;
|
||||||
|
|
||||||
repo->is_bare = is_bare;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user