-
Notifications
You must be signed in to change notification settings - Fork 2.7k
git init: Invalid symlink: Function not implemented #698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Have you noticed the direction of the directory separators.... The final In general G4W avoids any use of symlinks because of all the compatibility issues across Windows OS versions, and between Windows and Linux expectations. |
Have you noticed that it works in Git Bash? It's the same folder (symlink) and the same command. I need this in a .bat script, so maybe there is a workaround that can run git in environment similar to Git Bash with working symlinks? |
Hi Dmitry, maybe you could update https://github.com/git-for-windows/git/wiki/Symbolic-Links with the appropriate commands and commentary? i.e. the symtoms and 'workaround' setting, and where that setting is derived from (real question, as I don't know). It good to see the issues being bottomed out and documented.. Philip G4W actually supports symlinks. See issue #117 and PR #156. So, here is the workaround: E:\Projects\test\symlink-test\symlink>set MSYS="winsymlinks:nativestrict" E:\Projects\test\symlink-test\symlink>git init |
I would have expected that setting diff --git a/builtin/init-db.c b/builtin/init-db.c
index ec4c569..ec9340d 100644
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
@@ -194,6 +194,7 @@ static int create_default_files(const char *template_path)
*/
copy_templates(template_path);
+ git_config_clear();
git_config(git_default_config, NULL);
is_bare_repository_cfg = init_is_bare_repository;
@@ -528,6 +529,12 @@ int cmd_init_db(int argc, const char **argv, const char *prefix)
shared_repository = init_shared_repository;
/*
+ * We need the settings *before* trying to determine the current
+ * Git directory, e.g. to support core.symlinks properly.
+ */
+ git_config(git_default_config, NULL);
+
+ /*
* GIT_WORK_TREE makes sense only in conjunction with GIT_DIR
* without --bare. Catch the error early.
*/ This patch needs to be cleaned up, a test needs to be added to test it (most likely, the |
In case it was not clear: this diff is all I had time (for the time being) to contribute to the resolution of this ticket. |
Thank you @dscho. Unfortunately I also don't have enough time to finish the work. |
@Radrik5 okay. |
…ws#698) There was a typo in the configuration Scalar registers, which was missed by author and reviewer 🤦. No big harm done, let's just fix this in time for the next Git for Windows version. This is a companion to git-for-windows#5220.
or closed issue
matching what I'm seeing
Setup
output of
git version
as well.git version 2.7.2 64-bit
Windows 7 64-bit
defaults?
Path Option: BashOnly
SSH Option: OpenSSH
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Disabled
to the issue you're seeing?
Git doesn't work inside a directory symlink. I see the error in Git CMD but not in Git Bash.
Details
Git CMD
The real problem is that I cannot use nigher
C:\Program Files\Git\bin\git.exe
norC:\Program Files\Git\cmd\git.exe
from a .bat script. Git fails with the same error: Function not implemented.Minimal, Complete, and Verifiable example
this will help us understand the issue.
fatal error: Invalid symlink: Function not implemented
The text was updated successfully, but these errors were encountered: