msys/git: How can I disable git to set core.symlinks = false
into local setting by default?
#4116
Replies: 9 comments 3 replies
-
Of course Windows group policy to create symlink is enabled (for |
Beta Was this translation helpful? Give feedback.
-
@KSR-Yasuda, you write:
Is this MSYS2? What's it the output of |
Beta Was this translation helpful? Give feedback.
-
% uname -a
MINGW64_NT-10.0-19045 xxxxxxxx 3.4.9.x86_64 2023-09-15 12:15 UTC x86_64 Msys |
Beta Was this translation helpful? Give feedback.
-
Confirming in my setup:
On the other hand, Cygwin does not override
Although Git is a bit older (git version 2.39.0). Git on Midipix also behaves fine – no override during repo init. |
Beta Was this translation helpful? Give feedback.
-
Might contain some insight:
|
Beta Was this translation helpful? Give feedback.
-
@sskras Your git version v2.39.0 behaved the same: it sets local So, by some setting, Git-for-Windows env (installed separately) does work well without setting local |
Beta Was this translation helpful? Give feedback.
-
Perhaps because % ls -a
./ ../
% ln -s foo bar
ln: failed to create symbolic link 'bar': No such file or directory
% touch foo
% ls -a
./ ../ foo
% ln -s foo bar
'bar' -> 'foo'
% ls -l
total 0
lrwxrwxrwx 1 xxxxxxxx xxxxxxxx 3 Oct 24 17:23 bar -> foo
-rw-r--r-- 1 xxxxxxxx xxxxxxxx 0 Oct 24 17:23 foo
% ln --version
ln (GNU coreutils) 8.32
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
% pacman -F ln.exe
msys/coreutils 8.32-5 [installed]
usr/bin/ln.exe
git-for-windows/mingw-w64-x86_64-busybox 1.34.0.19688.985b51cf7-1
mingw64/libexec/busybox/ln.exe
% type -a ln
ln is aliased to `ln -v'
ln is /usr/bin/ln
ln is /bin/ln
ln is /c/Program Files (x86)/Gow/bin/ln In Git-for-Windows env (that does not set local
|
Beta Was this translation helpful? Give feedback.
-
Setting % for o in lnk native nativestrict sys; do
> MSYS="winsymlinks:$o" git init "test.$o"
> done
% find test.* -maxdepth 0 -type d -printf "\n%f\n" -exec cat {}/.git/config \;
test.lnk
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
ignorecase = true
test.native
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
ignorecase = true
test.nativestrict
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
test.sys
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
ignorecase = true As the comment #4116 (comment), Other |
Beta Was this translation helpful? Give feedback.
-
In creating (
git init
) or cloning (git clone
),msys/git sets local
core.symlinks = false
.By this, system (
/etc/gitconfig
) and global (${HOME}/.gitconfig
) settings are both ignored,unless removing
core.symlinks
from the local (TARGET_REPOSITORY/.git/config
) setting.Can I prevent git from setting this locally?
Beta Was this translation helpful? Give feedback.
All reactions