-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Use symbolic links for libexec #1997
Comments
Only if you build Git yourself. However:
This is incorrect. Those are not copies, those are hard links. It is true that Windows Explorer double-counts them, but they do not occupy more disk space than one copy + 127 directory entries pointing to the same start disk sector. You can verify this by running the following command: $ ls -l /mingw64/bin/git.exe
-rwxr-xr-x 127 johannes 197121 2755352 Dec 15 09:52 /mingw64/bin/git.exe* See that 127? That's the number of directory entries pointing at the same file contents. |
@organds, Any suggestions as to where the best place(s) would be to highlight the information? It is a question that does come up moderately frequently, so as some one who has been hit by the issue, maybe have a think about where you looked (or even if didn't 'look', why that was) so that we can educate folks and reduce the misunderstandings. Every little helps. [Would it be worth adding a line to the 'Known Issues' of the Release notes file:///C:/Program%20Files/Git/ReleaseNotes.html, just the head the issue off at the pass] |
I see. So you have one extra executable: libexec/git-core/git.exe:
@PhilipOakley : Maybe add an empty file inside libexec/git-core named |
@orgads yeah, no. I don't think that would be a good idea. First of all, this file would have to be generated only if the files really are hardlinks, and then that file would have to be left out e.g. when copying those files. That's just too fragile. At some point, we have to bite the bullet and just accept that most users do not really understand their system and need the explanation. I just hope that the number of contributors who relieve the maintainer of explaining this (in favor of chasing much harder bugs, or in favor of trying to hammer down work hours to a normal level) will continue to increase. |
Would I be reading this right, that my suggestion of a short(ish) extra line in the 'known issues' section could be that explanation? It may only find 40% of the users but at least its a reduction in complaints... (Should I add it to my list of things to do on retiral;-) |
@PhilipOakley sounds good ;-) |
Inform users that Windows Explorer double counts file sizes for hard links. fixes: #1977 (git-for-windows/git#1997) Signed-off-by: Philip Oakley <philipoakley@iee.org>
Addressed via git-for-windows/build-extra#229 |
What about this issue?
|
I'm updating the PR (#229 above) that adds this to the Known Issues list (assuming you are commenting about the "127" factor, rather than something I haven't understood) |
I don't refer to the factor. I refer to the additional executable libexec/git-core/git.exe, which is not a hard-link. |
That's a bug, and if you can figure out a fix, I'll be happy to accept a PR. |
(To clarify: this extra |
First observation: make install creates all as hard links, so it's probably something in the installer... |
It seems that the $ tar tvf mingw-w64-x86_64-git-2.21.0.1.2481c4cbe9-1-any.pkg.tar.xz
|grep 'git\.exe'
-rwxr-xr-x ContainerAdministrator/380929 40728 2019-02-26 20:48 cmd/git.exe
hrwxr-xr-x ContainerAdministrator/380929 0 2019-02-26 20:48 mingw64/bin/git.exe link to mingw64/bin/git-receive-pack.exe
hrwxr-xr-x ContainerAdministrator/380929 0 2019-02-26 20:48 mingw64/libexec/git-core/git.exe link to mingw64/bin/git-receive-pack.exe Meaning: something must be going wrong when the installer does its magic. It does call |
So the builtins are determined from the file |
That You see, we got so many concerns about that "massive" filesystem usage that we started to ship at least our portable Git with the builtins replaced not by hardlinked versions of |
Oh, and I was wrong about Now, the reason why it does not include I guess the best idea would be to teach Now, https://github.com/git-for-windows/MINGW-packages/blob/01d3f0e810b7e5a37488d97c860ba3df20685412/mingw-w64-git/git-wrapper.c#L696 tries to be very careful to strip only one directory level (the To extend this to And then we could teach the Of course, this all would need to be tested by
Seeing as I spent the last 38 minutes investigating it this far, I now think I should be doing more pressing things, and leave the rest to interested parties (I am looking at you, @orgads 😄 ) |
Is it possible to deploy Git with symbolic links in libexec/git-core instead of many hard copies of the git executable?
The text was updated successfully, but these errors were encountered: