Skip to content

Commit 971c53c

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 57f531e commit 971c53c

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
@@ -1775,7 +1775,7 @@ static void copy_templates_1(struct strbuf *path, struct strbuf *template_path,
17751775
if (strbuf_readlink(&lnk, template_path->buf,
17761776
st_template.st_size) < 0)
17771777
die_errno(_("cannot readlink '%s'"), template_path->buf);
1778-
if (symlink(lnk.buf, path->buf))
1778+
if (create_symlink(NULL, lnk.buf, path->buf))
17791779
die_errno(_("cannot symlink '%s' '%s'"),
17801780
lnk.buf, path->buf);
17811781
strbuf_release(&lnk);
@@ -2026,7 +2026,7 @@ static int create_default_files(const char *template_path,
20262026
path = git_path_buf(&buf, "tXXXXXX");
20272027
if (!close(xmkstemp(path)) &&
20282028
!unlink(path) &&
2029-
!symlink("testing", path) &&
2029+
!create_symlink(NULL, "testing", path) &&
20302030
!lstat(path, &st1) &&
20312031
S_ISLNK(st1.st_mode))
20322032
unlink(path); /* good */

0 commit comments

Comments
 (0)