Skip to content

Commit 9c322f1

Browse files
dschoGit for Windows Build Agent
authored andcommitted
fixup??? Introduce helper to create symlinks that knows about index_state
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 2602bae commit 9c322f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

setup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1785,7 +1785,7 @@ static void copy_templates_1(struct strbuf *path, struct strbuf *template_path,
17851785
if (strbuf_readlink(&lnk, template_path->buf,
17861786
st_template.st_size) < 0)
17871787
die_errno(_("cannot readlink '%s'"), template_path->buf);
1788-
if (symlink(lnk.buf, path->buf))
1788+
if (create_symlink(NULL, lnk.buf, path->buf))
17891789
die_errno(_("cannot symlink '%s' '%s'"),
17901790
lnk.buf, path->buf);
17911791
strbuf_release(&lnk);
@@ -2036,7 +2036,7 @@ static int create_default_files(const char *template_path,
20362036
path = git_path_buf(&buf, "tXXXXXX");
20372037
if (!close(xmkstemp(path)) &&
20382038
!unlink(path) &&
2039-
!symlink("testing", path) &&
2039+
!create_symlink(NULL, "testing", path) &&
20402040
!lstat(path, &st1) &&
20412041
S_ISLNK(st1.st_mode))
20422042
unlink(path); /* good */

0 commit comments

Comments
 (0)