Replies: 2 comments 3 replies
-
|
The primary reason, and maybe even the only reason, really, for these tools to be included in Git for Windows is that they are required by Git itself. Git is very opinionated in its use of those tools. In particular, it uses them in shell scripts, and uses forward slashes and Unix type paths that are not legal or at least not correct on Windows. Git for Windows relies on the MSYS2 runtime to translate between correct Windows paths and those Unix-y paths. So the first and foremost question must be, what is the reason to switch those tools out for Rust versions? In particular, you need to focus first on the question whether they can be used or whether they will break Git. And that's of paramount importance because breaking Git is obviously a non-option here. And I need to point out that this needs to be the main, maybe even the only focus: Does it benefit Git? If not, we can end the discussion early 😄 |
Beta Was this translation helpful? Give feedback.
-
Sure, it's an idea we could discuss.
While the performance of native utils (meaning coreutils, diffutils and findutils) would be nice, non-msys utils would probably break a lot of things for us. And even if we decide to bundle native utils, these prebuilt binaries are probably not what we want to go with.
Well, pretty much everything we distribute has to come from some upstream. I'm not sure what your distinction for this "some" is?
It seems like the mix and match approach also comes with "a lot of surface for errors & incompatibilities that no-one can test for or foresee." I also don't think we want to allow replacements for some of the packages you listed. What might work is switching to MSYS2s |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
With the adoption of uutils (the Rust rewrite of GNU coreutils, findutils, diffutils) by Ubuntu (2) starting with Ubuntu 25.10, I am wondering whether it makes sense to discuss uutils in the context of Git for Windows (GfW) as well. The continued (increased) adoption and improvements in compatibility with GNU versions should make them a safe alternative.
They offer statically linked (pre-built) binaries of these utils for Windows (for ARM64, x86, and x64) as well. At least from an end-user perspective this is quite neat because I can just download & use them – without having to rely on MSYS2 (MinGW, …), its toolchain or related bits and pieces to provide these tools on Windows. Particularly, I can use them from Windows, e.g. PowerShell, directly and they work. So … use them instead of the GNU utils? Not entirely sure this is a useful direction to begin with:
Previously GfW was modified to allow a different OpenSSH provider (somewhat hacky but it mostly works). The work on doing the same for GPG was abandoned because it turned out not to be "manageable but hacky" but "unmaintainably hacky". Having read through the linked MSYS2 discussion pertaining to GPG I am now wondering whether this whole "pick and choose" needs a broader view instead of tailored patches that bloat the whole process to allow for some individual replacements.
What do I mean with that? I am wondering what could be done centrally (in a maintainable fashion!) to "modularize" Git for Windows and allow users to either pick (or self-provide) alternative implementations for various tools that Git for Windows needs outright or provides for useful convenience.
I am currently aware of the following bits and pieces that ship with Git for Windows where alternative Windows binaries exist (from upstream/official sources):
Some of the upstream sources (curl, less, …) are already in use, I believe, but at the same time much of this software is also available via WinGet (community) packages allowing for (from a user perspective) easy access with a smooth installation experience using Windows built-in tooling + allowing individual updates.
As pointed out above: modifying the installer to dynamically provide compositions where users pick & choose individual replacements is non-trivial and also bloats the whole process. Additionally, it introduces a lot of surface for errors & incompatibilities that no-one can test for or foresee.
Instead, I am wondering whether the magic of
git.exeand itsPATHmodification ("git.exeforcefully prepends its own/usr/bin/to thePATH")should be looked at instead.I am thinking in terms of:
git.exe(andbash.exe, …) + a "checklist" (POSIX-compatibility?, for lack of a better term) that can be used instead and allows "to bring your own environment"PATHto find necessary toolsPATH-shim that substitutes in fallback options from the "safe-mode" environment if no other alternative is foundIf people then want to use a customized experience they would install the tools they like to replace (OpenSSH, GPG, …), put it onto the Windows native
PATHand start invoking the stripped down version. In case there are problems because of incompatibilities, they can always use the "safe-mode" version as a fallback.I think this kind-of might replace the existing picker of the 3 different integration approaches as well?
There are obviously a great many unknowns & holes in this proposal & a lot of work involved if it even makes sense. So no hurt feelings on my side if this is flat out refused to be entertained. However, I would still like to hear your thoughts on this and where GfW will go in the future considering things like WinGet & uutils as well as the huge internal maintenance effort to provide all the bits and pieces that make Git work on Windows work.
Beta Was this translation helpful? Give feedback.
All reactions