Merge pull request #6983 from libgit2/ethomson/template_path

This commit is contained in:
Edward Thomson
2024-12-27 17:05:17 +00:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -2538,7 +2538,8 @@ static int repo_init_structure(
int error = 0;
repo_template_item *tpl;
bool external_tpl =
((opts->flags & GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE) != 0);
opts->template_path != NULL ||
(opts->flags & GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE) != 0;
mode_t dmode = pick_dir_mode(opts);
bool chmod = opts->mode != GIT_REPOSITORY_INIT_SHARED_UMASK;

View File

@@ -228,8 +228,7 @@ void test_repo_template__extended_with_template_and_shared_mode(void)
const char *repo_path;
int filemode;
opts.flags = GIT_REPOSITORY_INIT_MKPATH |
GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE;
opts.flags = GIT_REPOSITORY_INIT_MKPATH;
opts.template_path = "template";
opts.mode = GIT_REPOSITORY_INIT_SHARED_GROUP;