8000 Merge pull request #6983 from libgit2/ethomson/template_path · libgit2/libgit2@5723964 · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5723964

Browse files
authored
Merge pull request #6983 from libgit2/ethomson/template_path
2 parents ccc2028 + 0c27a85 commit 5723964

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/libgit2/repository.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2538,7 +2538,8 @@ static int repo_init_structure(
25382538
int error = 0;
25392539
repo_template_item *tpl;
25402540
bool external_tpl =
2541-
((opts->flags & GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE) != 0);
2541+
opts->template_path != NULL ||
2542+
(opts->flags & GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE) != 0;
25422543
mode_t dmode = pick_dir_mode(opts);
25432544
bool chmod = opts->mode != GIT_REPOSITORY_INIT_SHARED_UMASK;
25442545

tests/libgit2/repo/template.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,7 @@ void test_repo_template__extended_with_template_and_shared_mode(void)
228228
const char *repo_path;
229229
int filemode;
230230

231-
opts.flags = GIT_REPOSITORY_INIT_MKPATH |
232-
GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE;
231+
opts.flags = GIT_REPOSITORY_INIT_MKPATH;
233232
opts.template_path = "template";
234233
opts.mode = GIT_REPOSITORY_INIT_SHARED_GROUP;
235234

0 commit comments

Comments
 (0)
0