Skip to content

Commit f4400c0

Browse files
committed
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 cf6786c commit f4400c0

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);
@@ -2024,7 +2024,7 @@ static int create_default_files(const char *template_path,
20242024
path = git_path_buf(&buf, "tXXXXXX");
20252025
if (!close(xmkstemp(path)) &&
20262026
!unlink(path) &&
2027-
!symlink("testing", path) &&
2027+
!create_symlink(NULL, "testing", path) &&
20282028
!lstat(path, &st1) &&
20292029
S_ISLNK(st1.st_mode))
20302030
unlink(path); /* good */

0 commit comments

Comments
 (0)