Skip to content

Commit

Permalink
Merge pull request #3417 from dscho/initialize-core.symlinks-earlier
Browse files Browse the repository at this point in the history
init: respect core.symlinks before copying the templates
  • Loading branch information
dscho authored and Git for Windows Build Agent committed Nov 25, 2024
2 parents 28a33ca + 863accc commit c869af2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions config.c
Original file line number Diff line number Diff line change
Expand Up @@ -1391,8 +1391,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")) {
Expand Down
2 changes: 2 additions & 0 deletions config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -2564,7 +2564,7 @@ int init_db(const char *git_dir, const char *real_git_dir,
* have set up the repository format such that we can evaluate
* includeIf conditions correctly in the case of re-initialization.
*/
git_config(platform_core_config, NULL);
git_config(git_default_core_config, NULL);

safe_create_dir(git_dir, 0);

Expand Down

0 comments on commit c869af2

Please sign in to comment.