Skip to content

Commit b10ffaa

Browse files
dschoGit for Windows Build Agent
authored andcommitted
fixup??? Introduce helper to create symlinks that knows about index_state
This is required by `en/header-split-cache-h-part-3`. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 2e61312 commit b10ffaa

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
@@ -1786,7 +1786,7 @@ static void copy_templates_1(struct strbuf *path, struct strbuf *template_path,
17861786
if (strbuf_readlink(&lnk, template_path->buf,
17871787
st_template.st_size) < 0)
17881788
die_errno(_("cannot readlink '%s'"), template_path->buf);
1789-
if (symlink(lnk.buf, path->buf))
1789+
if (create_symlink(NULL, lnk.buf, path->buf))
17901790
die_errno(_("cannot symlink '%s' '%s'"),
17911791
lnk.buf, path->buf);
17921792
strbuf_release(&lnk);
@@ -2037,7 +2037,7 @@ static int create_default_files(const char *template_path,
20372037
path = git_path_buf(&buf, "tXXXXXX");
20382038
if (!close(xmkstemp(path)) &&
20392039
!unlink(path) &&
2040-
!symlink("testing", path) &&
2040+
!create_symlink(NULL, "testing", path) &&
20412041
!lstat(path, &st1) &&
20422042
S_ISLNK(st1.st_mode))
20432043
unlink(path); /* good */

0 commit comments

Comments
 (0)