On Mon, Nov 13, 2023 at 08:14:03AM -0800, alvaro burnett wrote:
> Perhaps the solution to that is simply to write your software in a way that
> doesn't depend on bandwagonist third parties such as MSYS, which is what
> Fossil does. You can download the latest version and it will run on Windows
> XP and newer.
You are comparing apples to oranges here because Git and Fossil have very
different tracks of their initial development.
Fossil for a long time was a one-man project (as did SQLite, by the same
author) completely written in pure C, with an explicit goal of producing an
(almost) free-standing (self-sufficient) binary eligible for so-called x-copy
deployment. The Fossil's author does not do Windows, and neither he's
interested in it, but the fact SQLite is pure C, and so it Fossil has greatly
simplified porting to Windows. It's interesting to note that SQLite, thanks to
its longevity and ubiquitousness, had already contained a set of
Windows-specific kludges which helped Fossil.
Conversely, Git has started life as a gig of the original author of Linux,
with the specific goal of helping the development of Linux, on Linux.
Basically, the whole reason was to replace Bitkeeper which had suddenly became
unusable for the Linux developers, with no viable existing alternative. While
not in any way required, typical environments powered by Linux and used by
people to develop software feature a typical UNIX-y software stack - for
instance, a Unix-compatible shell, Perl and so on are taken for granted. This
is the first point to note: support for a non-Unix platform was not a goal for
a long time during the original development of Git. The second point is that
Git had two-layered Unix-y design right from the start: there's a set of
low-level core tools written in C, and a set of high-level user-facing tools
wielding the low-level ones to do heavy lifting. The upper layer tools were
routinely coded as shell and Perl scripts - simply because it was easier and
faster and provided fast code-experiment-change cycle. Given that, by the time
Git gained enough traction so there appeared interest in making it work on
Windows, there were just too much code which had to be either rewritten
completely in order to work on non-Unix-y systems or be made somehow work
there largely unmodified. The folks who started the porting effort (I think
Johannes was there right from the start) took the second route, and started
relying on already existing libraries and tooling which helped to have Unix-y
code compile and work on Windows. What is now known as Git-for-Windows has
been named "msysGit" for precisely the reason explained above.
Being a software developer myself, I would say the approach the GfW devs have
picked was the only correct one, given the situation at the time. You can
surely blame the original Git authors for not thinking about its portability
to non-POSIX platforms but, well, I've tried to explain why they had that
mindset: the initial use case for Git to exist was very narrow; they simply
did not think of world domination, they needed a very fast and reasonably
robust tool to efficiently handle the source code of a gigantic software
project.
Git is slowly being updated to eventually get rid of non-C code for its
core, but it's not there yet.