Skip to content

Commit fd9dbdf

Browse files
dschogitster
authored andcommitted
perf: let's disable symlinks when they are not available
We already have a perfectly fine prereq to tell us whether it is safe to use symlinks. So let's use it. This fixes the performance tests in Git for Windows' SDK, where symlinks are not really available ([*1*]). This is not an issue with Git for Windows itself because it configures core.symlinks=false in its system config. However, the system config is disabled for the performance tests, for obvious reasons: we want them to be independent of the vagaries of any local configuration. Footnote *1*: Windows has symbolic links. Git for Windows disables them by default, though (for example: in standard setups, non-admins lack the privilege to create symbolic links). For details, see https://github.com/git-for-windows/git/wiki/Symbolic-Links Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5fe494c commit fd9dbdf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

t/perf/perf-lib.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ test_perf_create_repo_from () {
9696
esac
9797
done &&
9898
cd .. &&
99-
git init -q &&
99+
git init -q && {
100+
test_have_prereq SYMLINKS ||
101+
git config core.symlinks false
102+
} &&
100103
mv .git/hooks .git/hooks-disabled 2>/dev/null
101104
) || error "failed to copy repository '$source' to '$repo'"
102105
}

0 commit comments

Comments
 (0)