Merge pull request #3417 from dscho/initialize-core.symlinks-earlier

init: respect core.symlinks before copying the templates
This commit is contained in:
Johannes Schindelin
2021-10-13 16:47:05 +02:00
3 changed files with 5 additions and 3 deletions

View File

@@ -1374,8 +1374,8 @@ int git_config_color(char *dest, const char *var, const char *value)
return 0;
}
static int git_default_core_config(const char *var, const char *value,
const struct config_context *ctx, void *cb)
int git_default_core_config(const char *var, const char *value,
const struct config_context *ctx, void *cb)
{
/* This needs a better name */
if (!strcmp(var, "core.filemode")) {

View File

@@ -167,6 +167,8 @@ typedef int (*config_fn_t)(const char *, const char *,
int git_default_config(const char *, const char *,
const struct config_context *, void *);
int git_default_core_config(const char *var, const char *value,
const struct config_context *ctx, void *cb);
/**
* Read a specific file in git-config format.

View File

@@ -2224,7 +2224,7 @@ int init_db(const char *git_dir, const char *real_git_dir,
startup_info->have_repository = 1;
/* Ensure `core.hidedotfiles` is processed */
git_config(platform_core_config, NULL);
git_config(git_default_core_config, NULL);
safe_create_dir(git_dir, 0);