forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Rebase to v2.53.0-rc0 #6043
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
Open
dscho
wants to merge
758
commits into
git-for-windows:main
Choose a base branch
from
dscho:rebase-to-v2.53.0-rc0
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Rebase to v2.53.0-rc0 #6043
+9,963
−4,896
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Atomic append on windows is only supported on local disk files, and it may cause errors in other situations, e.g. network file system. If that is the case, this config option should be used to turn atomic append off. Co-Authored-By: Johannes Schindelin <[email protected]> Signed-off-by: 孙卓识 <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
From the documentation of said setting: This boolean will enable fsync() when writing object files. This is a total waste of time and effort on a filesystem that orders data writes properly, but can be useful for filesystems that do not use journalling (traditional UNIX filesystems) or that only journal metadata and not file contents (OS X’s HFS+, or Linux ext3 with "data=writeback"). The most common file system on Windows (NTFS) does not guarantee that order, therefore a sudden loss of power (or any other event causing an unclean shutdown) would cause corrupt files (i.e. files filled with NULs). Therefore we need to change the default. Note that the documentation makes it sound as if this causes really bad performance. In reality, writing loose objects is something that is done only rarely, and only a handful of files at a time. Signed-off-by: Johannes Schindelin <[email protected]>
This compile-time option allows to ask Git to load libcurl dynamically at runtime. Together with a follow-up patch that optionally overrides the file name depending on the `http.sslBackend` setting, this kicks open the door for installing multiple libcurl flavors side by side, and load the one corresponding to the (runtime-)configured SSL/TLS backend. Signed-off-by: Johannes Schindelin <[email protected]>
Whith Windows 2000, Microsoft introduced a flag to the PE header to mark executables as "terminal server aware". Windows terminal servers provide a redirected Windows directory and redirected registry hives when launching legacy applications without this flag set. Since we do not use any INI files in the Windows directory and don't write to the registry, we don't need this additional preparation. Telling the OS that we don't need this should provide slightly improved startup times in terminal server environments. When building for supported Windows Versions with MSVC the /TSAWARE linker flag is automatically set, but MinGW requires us to set the --tsaware flag manually. This partially addresses git-for-windows#3935. Signed-off-by: Matthias Aßhauer <[email protected]>
Add FileVersion, which is a required field As not all required fields were present, none were being included Fixes git-for-windows#4090 Signed-off-by: Kiel Hurley <[email protected]>
In f9b7573 (repository: free fields before overwriting them, 2017-09-05), Git was taught to release memory before overwriting it, but 357a03e (repository.c: move env-related setup code back to environment.c, 2018-03-03) changed the code so that it would not _always_ be overwritten. As a consequence, the `commondir` attribute would point to already-free()d memory. This seems not to cause problems in core Git, but there are add-on patches in Git for Windows where the `commondir` attribute is subsequently used and causing invalid memory accesses e.g. in setups containing old-style submodules (i.e. the ones with a `.git` directory within theirs worktrees) that have `commondir` configured. This fixes git-for-windows#4083. Signed-off-by: Andrey Zabavnikov <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
This implements the Windows-specific support code, because everything is slightly different on Windows, even loading shared libraries. Note: I specifically do _not_ use the code from `compat/win32/lazyload.h` here because that code is optimized for loading individual functions from various system DLLs, while we specifically want to load _many_ functions from _one_ DLL here, and distinctly not a system DLL (we expect libcurl to be located outside `C:\Windows\system32`, something `INIT_PROC_ADDR` refuses to work with). Also, the `curl_easy_getinfo()`/`curl_easy_setopt()` functions are declared as vararg functions, which `lazyload.h` cannot handle. Finally, we are about to optionally override the exact file name that is to be loaded, which is a goal contrary to `lazyload.h`'s design. Signed-off-by: Johannes Schindelin <[email protected]>
The previous commits introduced a compile-time option to load libcurl lazily, but it uses the hard-coded name "libcurl-4.dll" (or equivalent on platforms other than Windows). To allow for installing multiple libcurl flavors side by side, where each supports one specific SSL/TLS backend, let's first look whether `libcurl-<backend>-4.dll` exists, and only use `libcurl-4.dll` as a fall back. That will allow us to ship with a libcurl by default that only supports the Secure Channel backend for the `https://` protocol. This libcurl won't suffer from any dependency problem when upgrading OpenSSL to a new major version (which will change the DLL name, and hence break every program and library that depends on it). This is crucial because Git for Windows relies on libcurl to keep working when building and deploying a new OpenSSL package because that library is used by `git fetch` and `git clone`. Note that this feature is by no means specific to Windows. On Ubuntu, for example, a `git` built using `LAZY_LOAD_LIBCURL` will use `libcurl.so.4` for `http.sslbackend=openssl` and `libcurl-gnutls.so.4` for `http.sslbackend=gnutls`. Signed-off-by: Johannes Schindelin <[email protected]>
This will help with Git for Windows' maintenance going forward: It allows Git for Windows to switch its primary libcurl to a variant without the OpenSSL backend, while still loading an alternate when setting `http.sslBackend = openssl`. This is necessary to avoid maintenance headaches with upgrading OpenSSL: its major version name is encoded in the shared library's file name and hence major version updates (temporarily) break libraries that are linked against the OpenSSL library. Signed-off-by: Johannes Schindelin <[email protected]>
In Git for Windows v2.39.0, we fixed a regression where `git.exe` would no longer work in Windows Nano Server (frequently used in Docker containers). This GitHub workflow can be used to verify manually that the Git/Scalar executables work in Nano Server. Signed-off-by: Johannes Schindelin <[email protected]>
When running Git for Windows on a remote APFS filesystem, it would appear that the `mingw_open_append()`/`write()` combination would fail almost exactly like on some CIFS-mounted shares as had been reported in git-for-windows#2753, albeit with a different `errno` value. Let's handle that `errno` value just the same, by suggesting to set `windows.appendAtomically=false`. Signed-off-by: David Lomas <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
Windows 10 version 1511 (also known as Anniversary Update), according to https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences introduced native support for ANSI sequence processing. This allows using colors from the entire 24-bit color range. All we need to do is test whether the console's "virtual processing support" can be enabled. If it can, we do not even need to start the `console_thread` to handle ANSI sequences. Or, almost all we need to do: When `console_thread()` does its work, it uses the Unicode-aware `write_console()` function to write to the Win32 Console, which supports Git for Windows' implicit convention that all text that is written is encoded in UTF-8. The same is not necessarily true if native ANSI sequence processing is used, as the output is then subject to the current code page. Let's ensure that the code page is set to `CP_UTF8` as long as Git writes to it. Signed-off-by: Johannes Schindelin <[email protected]>
By default, the buffer type of Windows' `stdout` is unbuffered (_IONBF), and there is no need to manually fflush `stdout`. But some programs, such as the Windows Filtering Platform driver provided by the security software, may change the buffer type of `stdout` to full buffering. This nees `fflush(stdout)` to be called manually, otherwise there will be no output to `stdout`. Signed-off-by: MinarKotonoha <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
A long time ago, we decided to run tests in Git for Windows' SDK with the default `winsymlinks` mode: copying instead of linking. This is still the default mode of MSYS2 to this day. However, this is not how most users run Git for Windows: As the majority of Git for Windows' users seem to be on Windows 10 and newer, likely having enabled Developer Mode (which allows creating symbolic links without administrator privileges), they will run with symlink support enabled. This is the reason why it is crucial to get the fixes for CVE-2024-? to the users, and also why it is crucial to ensure that the test suite exercises the related test cases. This commit ensures the latter. Signed-off-by: Johannes Schindelin <[email protected]>
The `__MINGW64__` constant is defined, surprise, surprise, only when
building for a 64-bit CPU architecture.
Therefore using it as a guard to define `_POSIX_C_SOURCE` (so that
`localtime_r()` is declared, among other functions) is not enough, we
also need to check `__MINGW32__`.
Technically, the latter constant is defined even for 64-bit builds. But
let's make things a bit easier to understand by testing for both
constants.
Making it so fixes this compile warning (turned error in GCC v14.1):
archive-zip.c: In function 'dos_time':
archive-zip.c:612:9: error: implicit declaration of function 'localtime_r';
did you mean 'localtime_s'? [-Wimplicit-function-declaration]
612 | localtime_r(&time, &tm);
| ^~~~~~~~~~~
| localtime_s
Signed-off-by: Johannes Schindelin <[email protected]>
Start work on a new 'git survey' command to scan the repository for monorepo performance and scaling problems. The goal is to measure the various known "dimensions of scale" and serve as a foundation for adding additional measurements as we learn more about Git monorepo scaling problems. The initial goal is to complement the scanning and analysis performed by the GO-based 'git-sizer' (https://github.com/github/git-sizer) tool. It is hoped that by creating a builtin command, we may be able to take advantage of internal Git data structures and code that is not accessible from GO to gain further insight into potential scaling problems. Co-authored-by: Derrick Stolee <[email protected]> Signed-off-by: Jeff Hostetler <[email protected]> Signed-off-by: Derrick Stolee <[email protected]>
By default we will scan all references in "refs/heads/", "refs/tags/" and "refs/remotes/". Add command line opts let the use ask for all refs or a subset of them and to include a detached HEAD. Signed-off-by: Jeff Hostetler <[email protected]> Signed-off-by: Derrick Stolee <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
When 'git survey' provides information to the user, this will be presented in one of two formats: plaintext and JSON. The JSON implementation will be delayed until the functionality is complete for the plaintext format. The most important parts of the plaintext format are headers specifying the different sections of the report and tables providing concreted data. Create a custom table data structure that allows specifying a list of strings for the row values. When printing the table, check each column for the maximum width so we can create a table of the correct size from the start. The table structure is designed to be flexible to the different kinds of output that will be implemented in future changes. Signed-off-by: Derrick Stolee <[email protected]>
At the moment, nothing is obvious about the reason for the use of the
path-walk API, but this will become more prevelant in future iterations. For
now, use the path-walk API to sum up the counts of each kind of object.
For example, this is the reachable object summary output for my local repo:
REACHABLE OBJECT SUMMARY
========================
Object Type | Count
------------+-------
Tags | 1343
Commits | 179344
Trees | 314350
Blobs | 184030
Signed-off-by: Derrick Stolee <[email protected]>
In order to be a better Windows citizenship, Git should save its configuration files on AppData folder. This can enables git configuration files be replicated between machines using the same Microsoft account logon which would reduce the friction of setting up Git on new systems. Therefore, if %APPDATA%\Git\config exists, we use it; otherwise $HOME/.config/git/config is used. Signed-off-by: Ariel Lourenco <[email protected]>
Git LFS is now built with Go 1.21 which no longer supports Windows 7. However, Git for Windows still wants to support Windows 7. Ideally, Git LFS would re-introduce Windows 7 support until Git for Windows drops support for Windows 7, but that's not going to happen: git-for-windows#4996 (comment) The next best thing we can do is to let the users know what is happening, and how to get out of their fix, at least. This is not quite as easy as it would first seem because programs compiled with Go 1.21 or newer will simply throw an exception and fail with an Access Violation on Windows 7. The only way I found to address this is to replicate the logic from Go's very own `version` command (which can determine the Go version with which a given executable was built) to detect the situation, and in that case offer a helpful error message. This addresses git-for-windows#4996. Signed-off-by: Johannes Schindelin <[email protected]>
The sparse tree walk algorithm was created in d5d2e93 (revision: implement sparse algorithm, 2019-01-16) and involves using the mark_trees_uninteresting_sparse() method. This method takes a repository and an oidset of tree IDs, some of which have the UNINTERESTING flag and some of which do not. Create a method that has an equivalent set of preconditions but uses a "dense" walk (recursively visits all reachable trees, as long as they have not previously been marked UNINTERESTING). This is an important difference from mark_tree_uninteresting(), which short-circuits if the given tree has the UNINTERESTING flag. A use of this method will be added in a later change, with a condition set whether the sparse or dense approach should be used. Signed-off-by: Derrick Stolee <[email protected]>
As reported in https://lore.kernel.org/git/[email protected]/, libcurl v8.10.0 had a regression that was picked up by Git's t5559.30 "large fetch-pack requests can be sent using chunked encoding". This bug was fixed in libcurl v8.10.1. Sadly, the macos-13 runner image was updated in the brief window between these two libcurl versions, breaking each and every CI build, as reported at git-for-windows#5159. This would usually not matter, we would just ignore the failing CI builds until the macos-13 runner image is rebuilt in a couple of days, and then the CI builds would succeed again. However. As has become the custom, a surprise Git version was released, and now that Git for Windows wants to follow suit, since Git for Windows has this custom of trying to never release a version with a failing CI build, we _must_ work around it. This patch implements this work-around, basically for the sake of Git for Windows v2.46.2's CI build. Signed-off-by: Johannes Schindelin <[email protected]>
Now that we have explored objects by count, we can expand that a bit more to summarize the data for the on-disk and inflated size of those objects. This information is helpful for diagnosing both why disk space (and perhaps clone or fetch times) is growing but also why certain operations are slow because the inflated size of the abstract objects that must be processed is so large. Note: zlib-ng is slightly more efficient even at those small sizes. Even between zlib versions, there are slight differences in compression. To accommodate for that in the tests, not the exact numbers but some rough approximations are validated (the test should validate `git survey`, after all, not zlib). Signed-off-by: Derrick Stolee <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
Signed-off-by: Derrick Stolee <[email protected]>
The winsock2 library provides functions that work on different data types than file descriptors, therefore we wrap them. But that is not the only difference: they also do not set `errno` but expect the callers to enquire about errors via `WSAGetLastError()`. Let's translate that into appropriate `errno` values whenever the socket operations fail so that Git's code base does not have to change its expectations. This closes git-for-windows#2404 Helped-by: Jeff Hostetler <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
In future changes, we will make use of these methods. The intention is to keep track of the top contributors according to some metric. We don't want to store all of the entries and do a sort at the end, so track a constant-size table and remove rows that get pushed out depending on the chosen sorting algorithm. Co-authored-by: Jeff Hostetler <[email protected]> Signed-off-by; Jeff Hostetler <[email protected]> Signed-off-by: Derrick Stolee <[email protected]>
We map WSAGetLastError() errors to errno errors in winsock_error_to_errno(), but the MSVC strerror() implementation only produces "Unknown error" for most of them. Produce some more meaningful error messages in these cases. Our builds for ARM64 link against the newer UCRT strerror() that does know these errors, so we won't change the strerror() used there. The wording of the messages is copied from glibc strerror() messages. Reported-by: M Hickford <[email protected]> Signed-off-by: Matthias Aßhauer <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
Since we are already walking our reachable objects using the path-walk API,
let's now collect lists of the paths that contribute most to different
metrics. Specifically, we care about
* Number of versions.
* Total size on disk.
* Total inflated size (no delta or zlib compression).
This information can be critical to discovering which parts of the
repository are causing the most growth, especially on-disk size. Different
packing strategies might help compress data more efficiently, but the toal
inflated size is a representation of the raw size of all snapshots of those
paths. Even when stored efficiently on disk, that size represents how much
information must be processed to complete a command such as 'git blame'.
The exact disk size seems to be not quite robust enough for testing, as
could be seen by the `linux-musl-meson` job consistently failing, possibly
because of zlib-ng deflates differently: t8100.4(git survey
(default)) was failing with a symptom like this:
TOTAL OBJECT SIZES BY TYPE
===============================================
Object Type | Count | Disk Size | Inflated Size
------------+-------+-----------+--------------
- Commits | 10 | 1523 | 2153
+ Commits | 10 | 1528 | 2153
Trees | 10 | 495 | 1706
Blobs | 10 | 191 | 101
- Tags | 4 | 510 | 528
+ Tags | 4 | 547 | 528
This means: the disk size is unlikely something we can verify robustly.
Since zlib-ng seems to increase the disk size of the tags from 528 to
547, we cannot even assume that the disk size is always smaller than the
inflated size. We will most likely want to either skip verifying the
disk size altogether, or go for some kind of fuzzy matching, say, by
replacing `s/ 1[45][0-9][0-9] / ~1.5k /` and `s/ [45][0-9][0-9] / ~½k /`
or something like that.
Signed-off-by: Derrick Stolee <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
This comment has been true for the longest time; The combination of the two preceding commits made it incorrect, so let's drop that comment. Signed-off-by: Matthias Aßhauer <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
The `--stdin` option was a well-established paradigm in other commands, therefore we implemented it in `git reset` for use by Visual Studio. Unfortunately, upstream Git decided that it is time to introduce `--pathspec-from-file` instead. To keep backwards-compatibility for some grace period, we therefore reinstate the `--stdin` option on top of the `--pathspec-from-file` option, but mark it firmly as deprecated. Helped-by: Victoria Dye <[email protected]> Helped-by: Matthew John Cheetham <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
Reintroduce the 'core.useBuiltinFSMonitor' config setting (originally added in 0a756b2 (fsmonitor: config settings are repository-specific, 2021-03-05)) after its removal from the upstream version of FSMonitor. Upstream, the 'core.useBuiltinFSMonitor' setting was rendered obsolete by "overloading" the 'core.fsmonitor' setting to take a boolean value. However, several applications (e.g., 'scalar') utilize the original config setting, so it should be preserved for a deprecation period before complete removal: * if 'core.fsmonitor' is a boolean, the user is correctly using the new config syntax; do not use 'core.useBuiltinFSMonitor'. * if 'core.fsmonitor' is unspecified, use 'core.useBuiltinFSMonitor'. * if 'core.fsmonitor' is a path, override and use the builtin FSMonitor if 'core.useBuiltinFSMonitor' is 'true'; otherwise, use the FSMonitor hook indicated by the path. Additionally, for this deprecation period, advise users to switch to using 'core.fsmonitor' to specify their use of the builtin FSMonitor. Signed-off-by: Victoria Dye <[email protected]>
See https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot#enabling-dependabot-version-updates-for-actions for details. Signed-off-by: Johannes Schindelin <[email protected]>
The Git for Windows project has grown quite complex over the years, certainly much more complex than during the first years where the `msysgit.git` repository was abusing Git for package management purposes and the `git/git` fork was called `4msysgit.git`. Let's describe the status quo in a thorough way. Signed-off-by: Johannes Schindelin <[email protected]>
The Git project followed Git for Windows' lead and added their Code of Conduct, based on the Contributor Covenant v1.4, later updated to v2.0. We adapt it slightly to Git for Windows. Signed-off-by: Johannes Schindelin <[email protected]>
Getting started contributing to Git can be difficult on a Windows machine. CONTRIBUTING.md contains a guide to getting started, including detailed steps for setting up build tools, running tests, and submitting patches to upstream. [includes an example by Pratik Karki how to submit v2, v3, v4, etc.] Signed-off-by: Derrick Stolee <[email protected]>
Includes touch-ups by 마누엘, Philip Oakley and 孙卓识. Signed-off-by: Johannes Schindelin <[email protected]>
With improvements by Clive Chan, Adric Norris, Ben Bodenmiller and Philip Oakley. Helped-by: Clive Chan <[email protected]> Helped-by: Adric Norris <[email protected]> Helped-by: Ben Bodenmiller <[email protected]> Helped-by: Philip Oakley <[email protected]> Signed-off-by: Brendan Forster <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
Git for Windows accepts pull requests; Core Git does not. Therefore we need to adjust the template (because it only matches core Git's project management style, not ours). Also: direct Git for Windows enhancements to their contributions page, space out the text for easy reading, and clarify that the mailing list is plain text, not HTML. Signed-off-by: Philip Oakley <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
These are Git for Windows' Git GUI and gitk patches. We will have to decide at some point what to do about them, but that's a little lower priority (as Git GUI seems to be unmaintained for the time being, and the gitk maintainer keeps a very low profile on the Git mailing list, too). Signed-off-by: Johannes Schindelin <[email protected]>
This is the recommended way on GitHub to describe policies revolving around security issues and about supported versions. Helped-by: Sven Strickroth <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
This was pull request git-for-windows#1645 from ZCube/master Support windows container. Signed-off-by: Johannes Schindelin <[email protected]>
…ws#4527) With this patch, Git for Windows works as intended on mounted APFS volumes (where renaming read-only files would fail). Signed-off-by: Johannes Schindelin <[email protected]>
Specify symlink type in .gitattributes
Signed-off-by: Johannes Schindelin <[email protected]>
This patch introduces support to set special NTFS attributes that are interpreted by the Windows Subsystem for Linux as file mode bits, UID and GID. Signed-off-by: Johannes Schindelin <[email protected]>
Handle Ctrl+C in Git Bash nicely Signed-off-by: Johannes Schindelin <[email protected]>
A fix for calling `vim` in Windows Terminal caused a regression and was reverted. We partially un-revert this, to get the fix again. Signed-off-by: Johannes Schindelin <[email protected]>
This topic branch re-adds the deprecated --stdin/-z options to `git reset`. Those patches were overridden by a different set of options in the upstream Git project before we could propose `--stdin`. We offered this in MinGit to applications that wanted a safer way to pass lots of pathspecs to Git, and these applications will need to be adjusted. Instead of `--stdin`, `--pathspec-from-file=-` should be used, and instead of `-z`, `--pathspec-file-nul`. Signed-off-by: Johannes Schindelin <[email protected]>
Originally introduced as `core.useBuiltinFSMonitor` in Git for Windows and developed, improved and stabilized there, the built-in FSMonitor only made it into upstream Git (after unnecessarily long hemming and hawing and throwing overly perfectionist style review sticks into the spokes) as `core.fsmonitor = true`. In Git for Windows, with this topic branch, we re-introduce the now-obsolete config setting, with warnings suggesting to existing users how to switch to the new config setting, with the intention to ultimately drop the patch at some stage. Signed-off-by: Johannes Schindelin <[email protected]>
…updates Start monitoring updates of Git for Windows' component in the open
Add a README.md for GitHub goodness. Signed-off-by: Johannes Schindelin <[email protected]>
Member
Author
|
/git-artifacts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The usual thing.
Range-diff relative to
1: 962ce4c = 1: 054d297 sideband: mask control characters
2: 8b6de36 = 2: 11155ab sideband: introduce an "escape hatch" to allow control characters
3: 2beea47 = 3: 08bff14 sideband: do allow ANSI color sequences by default
4: 3e510fd = 4: 7bc663f unix-socket: avoid leak when initialization fails
5: 468939d = 5: f33c39d grep: prevent
^$false match at end of file6: 050f63d = 6: d443041 t9350: point out that refs are not updated correctly
7: 46bbb03 = 7: f225117 transport-helper: add trailing --
8: 03ad2b2 = 8: aa43d63 remote-helper: check helper status after import/export
10: 9fe4cf6 = 9: 2970cad Always auto-gc after calling a fast-import transport
9: 6f8fda1 ! 10: 433fbf2 mingw: demonstrate a problem with certain absolute paths
11: 7862b33 < -: ------------ mingw: allow absolute paths without drive prefix
15: 8215e9c = 11: 29434e3 clean: do not traverse mount points
12: 72fd7cb = 12: 59823fe mingw: include the Python parts in the build
13: d56d911 ! 13: 12ecc9c win32/pthread: avoid name clashes with winpthread
17: cf84f7a = 14: 1891e11 clean: remove mount points when possible
14: 3bb787c = 15: f4ebed7 git-compat-util: avoid redeclaring _DEFAULT_SOURCE
16: f791a28 < -: ------------ Import the source code of mimalloc v2.2.4
21: b09994e = 16: 5dc036e transport: optionally disable side-band-64k
22: 98a1c8e = 17: dccf34b mingw: do resolve symlinks in
getcwd()25: 756af37 = 18: a4fe6c5 mingw: demonstrate a
git addissue with NTFS junctions26: e0b3fca = 19: 7240cd0 strbuf_realpath(): use platform-dependent API if available
23: 477a1da = 20: e4a4aa5 mingw: fix fatal error working on mapped network drives on Windows
24: 16ca5a9 = 21: 45e3edf clink.pl: fix MSVC compile script to handle libcurl-d.lib
28: e26c17c = 22: cf4f614 mingw: implement a platform-specific
strbuf_realpath()29: c822585 = 23: e4a1ca6 t5505/t5516: allow running without
.git/branches/in the templates33: 52ac141 = 24: d39efee http: use new "best effort" strategy for Secure Channel revoke checking
31: a4852d4 = 25: 9dc1a8b t5505/t5516: fix white-space around redirectors
34: 8cf8ef1 = 26: ee46b58 t3701: verify that we can add lots of files interactively
36: 6461f25 = 27: 0ccb821 commit: accept "scissors" with CR/LF line endings
37: a96f2e4 = 28: 54a32d5 t0014: fix indentation
38: 8bdb8db = 29: e34bacd git-gui: accommodate for intent-to-add files
43: 1363ae9 = 30: a57a900 vcpkg_install: detect lack of Git
45: 09187cf = 31: 332d431 vcpkg_install: add comment regarding slow network connections
47: eac5912 = 32: 7836eb8 vcbuild: install ARM64 dependencies when building ARM64 binaries
48: 7b43b20 = 33: 9e97ba9 vcbuild: add an option to install individual 'features'
49: e8d595e = 34: a91e61c cmake: allow building for Windows/ARM64
50: da5080e = 35: 5946c35 ci(vs-build) also build Windows/ARM64 artifacts
51: 9915328 = 36: 0589429 Add schannel to curl installation
52: 8bc5cb0 = 37: 397169f cmake(): allow setting HOST_CPU for cross-compilation
54: af14bae = 38: c9629b7 mingw: allow for longer paths in
parse_interpreter()55: 07912b1 = 39: d8c2a1d compat/vcbuild: document preferred way to build in Visual Studio
57: 362ccba = 40: 151b419 CMake: default Visual Studio generator has changed
58: 18080f7 = 41: b2b5edc .gitignore: add Visual Studio CMakeSetting.json file
53: 782cd15 = 42: 565378c subtree: update
contrib/subtreetesttarget59: 7331098 = 43: bf74d89 CMakeLists: add default "x64-windows" arch for Visual Studio
56: 1fcc7fc = 44: 77d6c57 http: optionally send SSL client certificate
60: 7048600 = 45: 637d76c ci: run
contrib/subtreetests in CI builds63: dc8b7e0 = 46: 9e4b1be hash-object: demonstrate a >4GB/LLP64 problem
61: 9ccd499 = 47: 6113951 CMake: show Win32 and Generator_platform build-option values
62: 54ba8da = 48: 2299036 init: do parse all core.* settings early
68: 03db3ec = 49: 00a38f6 setup: properly use "%(prefix)/" when in WSL
71: a92c810 = 50: 3d4b5cb Add config option
windows.appendAtomically70: 6c55a5e = 51: 0153b8d compat/mingw.c: do not warn when failing to get owner
73: 2b9cae2 = 52: e9f5a26 mingw: $env:TERM="xterm-256color" for newer OSes
74: 8bec4e5 = 53: b82ee10 winansi: check result and Buffer before using Name
75: 3b22b60 = 54: 4f94a73 mingw: change core.fsyncObjectFiles = 1 by default
72: 0b9a0f4 = 55: 3fe2d2c MinGW: link as terminal server aware
78: e7e8992 = 56: b9c0086 http: optionally load libcurl lazily
76: e2f7a10 = 57: a737025 Fix Windows version resources
77: 84b80ef = 58: 3486fc6 status: fix for old-style submodules with commondir
79: cb8801f = 59: f72f60c http: support lazy-loading libcurl also on Windows
80: 5c9965e = 60: 23a0ac0 http: when loading libcurl lazily, allow for multiple SSL backends
82: 8d177c9 = 61: 234a3bd mingw: do load libcurl dynamically by default
83: 20a33f6 = 62: 8e20dc1 Add a GitHub workflow to verify that Git/Scalar work in Nano Server
84: 7bb3751 = 63: 4130382 mingw: suggest
windows.appendAtomicallyin more cases85: 81a2964 = 64: c8f0a92 win32: use native ANSI sequence processing, if possible
87: 1a2fd28 = 65: d9a0f9d common-main.c: fflush stdout buffer upon exit
88: 5986729 = 66: ad8803a t5601/t7406(mingw): do run tests with symlink support
89: 8332d06 = 67: 2734642 win32: ensure that
localtime_r()is declared even in i686 builds90: e16d02b = 68: ef1254b ci: work around a problem with HTTP/2 vs libcurl v8.10.0
93: f3f18a2 = 69: ea0c51e revision: create mark_trees_uninteresting_dense()
94: 95df0f6 ! 70: 9ae1397 survey: stub in new experimental 'git-survey' command
95: f81d8b1 = 71: 4e7453d survey: add command line opts to select references
96: af65786 = 72: d787ed6 survey: start pretty printing data in table form
97: 3c4ed6b = 73: 10df7ad survey: add object count summary
91: ec071b0 = 74: 0fb4cff Fallback to AppData if XDG_CONFIG_HOME is unset
92: 1a38026 = 75: d2ae7c4 run-command: be helpful with Git LFS fails on Windows 7
98: 192e38c = 76: 7035055 survey: summarize total sizes by object type
99: f78e16f = 77: 36f1a8c survey: show progress during object walk
101: a0986d5 = 78: c5c25d8 mingw: make sure
errnois set correctly when socket operations fail100: 22fab6f = 79: 1fc52bc survey: add ability to track prioritized lists
103: b460b4f = 80: 795a4f7 compat/mingw: handle WSA errors in strerror
102: f7c6633 = 81: 0917777 survey: add report of "largest" paths
105: 27e428f = 82: 11f07ee compat/mingw: drop outdated comment
104: acf11e8 = 83: 1945122 survey: add --top= option and config
107: ace4563 = 84: 3ee518d t0301: actually test credential-cache on Windows
106: 4da203a = 85: 851712a survey: clearly note the experimental nature in the output
108: 84784be = 86: 58a61cd credential-cache: handle ECONNREFUSED gracefully
110: 24b3044 = 87: 170494e reftable: do make sure to use custom allocators
111: 201d5dd = 88: 10a8284 check-whitespace: avoid alerts about upstream commits
238: 322a685 = 89: 991c5bb Import the source code of mimalloc v2.2.6
18: 8bf895f = 90: 0971b7f mimalloc: adjust for building inside Git
19: 0dc1144 = 91: 149dc78 mimalloc: offer a build-time option to enable it
20: dfd3928 = 92: 836a752 mingw: use mimalloc
64: dd895b7 ! 93: b9da4f8 object-file.c: use size_t for header lengths
@@ Commit message Signed-off-by: Johannes Schindelin <[email protected]> ## object-file.c ## -@@ object-file.c: int loose_object_info(struct repository *r, +@@ object-file.c: int odb_source_loose_read_object_info(struct odb_source *source, static void hash_object_body(const struct git_hash_algo *algo, struct git_hash_ctx *c, const void *buf, unsigned long len, struct object_id *oid, @@ object-file.c: int finalize_object_file_flags(struct repository *repo, write_object_file_prepare(algo, buf, len, type, oid, hdr, &hdrlen); } -@@ object-file.c: int stream_loose_object(struct odb_source *source, +@@ object-file.c: int odb_source_loose_write_stream(struct odb_source *source, } - int write_object_file(struct odb_source *source, -- const void *buf, unsigned long len, -+ const void *buf, size_t len, - enum object_type type, struct object_id *oid, - struct object_id *compat_oid_in, unsigned flags) + int odb_source_loose_write_object(struct odb_source *source, +- const void *buf, unsigned long len, ++ const void *buf, size_t len, + enum object_type type, struct object_id *oid, + struct object_id *compat_oid_in, unsigned flags) { -@@ object-file.c: int write_object_file(struct odb_source *source, +@@ object-file.c: int odb_source_loose_write_object(struct odb_source *source, const struct git_hash_algo *compat = source->odb->repo->compat_hash_algo; struct object_id compat_oid; char hdr[MAX_HEADER_LEN]; @@ object-file.c: int write_object_file(struct odb_source *source, if (compat) { ## object-file.h ## -@@ object-file.h: struct object_info; - int parse_loose_header(const char *hdr, struct object_info *oi); +@@ object-file.h: int odb_source_loose_freshen_object(struct odb_source *source, + const struct object_id *oid); - int write_object_file(struct odb_source *source, -- const void *buf, unsigned long len, -+ const void *buf, size_t len, - enum object_type type, struct object_id *oid, - struct object_id *compat_oid_in, unsigned flags); + int odb_source_loose_write_object(struct odb_source *source, +- const void *buf, unsigned long len, ++ const void *buf, size_t len, + enum object_type type, struct object_id *oid, + struct object_id *compat_oid_in, unsigned flags); @@ object-file.h: int finalize_object_file_flags(struct repository *repo, enum finalize_object_file_flags flags);65: 71c7eba ! 94: 840b7e4 hash algorithms: use size_t for section lengths
@@ Commit message Signed-off-by: Johannes Schindelin <[email protected]> ## object-file.c ## -@@ object-file.c: int loose_object_info(struct repository *r, +@@ object-file.c: int odb_source_loose_read_object_info(struct odb_source *source, } static void hash_object_body(const struct git_hash_algo *algo, struct git_hash_ctx *c,66: c6c20a5 = 95: c8273e7 hash-object --stdin: verify that it works with >4GB/LLP64
67: f384eab = 96: 8f24466 hash-object: add another >4GB/LLP64 test case
69: fb0c951 = 97: b8c422a hash-object: add a >4GB/LLP64 test case using filtered input
81: e7af370 = 98: e9b7d36 windows: skip linking
git-<command>for built-ins225: a01bfe6 ! 99: 7766c21 mingw: stop hard-coding
CC = gcc@@ config.mak.uname: ifeq ($(uname_S),MINGW) endif - CC = gcc COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO=0 -DDETECT_MSYS_TTY \ - -DENSURE_MSYSTEM_IS_SET -fstack-protector-strong + -fstack-protector-strong EXTLIBS += -lntdll227: 049d5f5 = 100: 649d991 mingw: drop the -D_USE_32BIT_TIME_T option
228: 119d8af ! 101: 7f1f795 mingw: only use -Wl,--large-address-aware for 32-bit builds
@@ config.mak.uname: ifeq ($(uname_S),MINGW) - BASIC_LDFLAGS += -Wl,--large-address-aware endif COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO=0 -DDETECT_MSYS_TTY \ - -DENSURE_MSYSTEM_IS_SET -fstack-protector-strong + -fstack-protector-strong229: 7ac403b = 102: 6a316da mingw: avoid over-specifying
--pic-executable230: ca0a65a ! 103: 3e55d27 mingw: set the prefix and HOST_CPU as per MSYS2's settings
@@ config.mak.uname: ifeq ($(uname_S),MINGW) + endif endif COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO=0 -DDETECT_MSYS_TTY \ - -DENSURE_MSYSTEM_IS_SET -fstack-protector-strong + -fstack-protector-strong231: 513d221 ! 104: 8b4d819 mingw: only enable the MSYS2-specific stuff when compiling in MSYS2
232: eea27f5 ! 105: 06a6b28 mingw: rely on MSYS2's metadata instead of hard-coding it
@@ Commit message Signed-off-by: Johannes Schindelin <[email protected]> - ## compat/mingw.c ## -@@ compat/mingw.c: int xwcstoutf(char *utf, const wchar_t *wcs, size_t utflen) - } - - #ifdef ENSURE_MSYSTEM_IS_SET --#if !defined(RUNTIME_PREFIX) || !defined(HAVE_WPGMPTR) -+#if !defined(RUNTIME_PREFIX) || !defined(HAVE_WPGMPTR) || !defined(MINGW_PREFIX) - static size_t append_system_bin_dirs(char *path UNUSED, size_t size UNUSED) - { - return 0; -@@ compat/mingw.c: static size_t append_system_bin_dirs(char *path, size_t size) - /* strip trailing `git.exe` */ - len = slash - prefix; - -- /* strip trailing `cmd` or `mingw64\bin` or `mingw32\bin` or `bin` or `libexec\git-core` */ -- if (strip_suffix_mem(prefix, &len, "\\mingw64\\libexec\\git-core") || -- strip_suffix_mem(prefix, &len, "\\mingw64\\bin")) -+ /* strip trailing `cmd` or `<mingw-prefix>\bin` or `bin` or `libexec\git-core` */ -+ if (strip_suffix_mem(prefix, &len, "\\" MINGW_PREFIX "\\libexec\\git-core") || -+ strip_suffix_mem(prefix, &len, "\\" MINGW_PREFIX "\\bin")) - off += xsnprintf(path + off, size - off, -- "%.*s\\mingw64\\bin;", (int)len, prefix); -- else if (strip_suffix_mem(prefix, &len, "\\clangarm64\\libexec\\git-core") || -- strip_suffix_mem(prefix, &len, "\\clangarm64\\bin")) -- off += xsnprintf(path + off, size - off, -- "%.*s\\clangarm64\\bin;", (int)len, prefix); -- else if (strip_suffix_mem(prefix, &len, "\\mingw32\\libexec\\git-core") || -- strip_suffix_mem(prefix, &len, "\\mingw32\\bin")) -- off += xsnprintf(path + off, size - off, -- "%.*s\\mingw32\\bin;", (int)len, prefix); -+ "%.*s\\" MINGW_PREFIX "\\bin;", (int)len, prefix); - else if (strip_suffix_mem(prefix, &len, "\\cmd") || - strip_suffix_mem(prefix, &len, "\\bin") || - strip_suffix_mem(prefix, &len, "\\libexec\\git-core")) - off += xsnprintf(path + off, size - off, -- "%.*s\\mingw%d\\bin;", (int)len, prefix, -- (int)(sizeof(void *) * 8)); -+ "%.*s\\" MINGW_PREFIX "\\bin;", (int)len, prefix); - else - return 0; - -@@ compat/mingw.c: static void setup_windows_environment(void) - char buf[32768]; - size_t off = 0; - --#if defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC) -- setenv("MSYSTEM", "CLANGARM64", 1); --#elif defined(__MINGW64__) || defined(_M_AMD64) -- setenv("MSYSTEM", "MINGW64", 1); --#else -- setenv("MSYSTEM", "MINGW32", 1); --#endif -+ setenv("MSYSTEM", ENSURE_MSYSTEM_IS_SET, 1); - - if (home) - off += xsnprintf(buf + off, sizeof(buf) - off, - ## config.mak.uname ## @@ config.mak.uname: ifeq ($(uname_S),Windows) GIT_VERSION := $(GIT_VERSION).MSVC @@ config.mak.uname: ifeq ($(uname_S),Windows) endif # Prepend MSVC 64-bit tool-chain to PATH. # -@@ config.mak.uname: endif - compat/win32/pthread.o compat/win32/syslog.o \ - compat/win32/trace2_win32_process_info.o \ - compat/win32/dirent.o compat/win32/fscache.o compat/win32/wsl.o -- COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DDETECT_MSYS_TTY -DENSURE_MSYSTEM_IS_SET -DNOGDI -DHAVE_STRING_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\".exe\" -+ COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DDETECT_MSYS_TTY \ -+ -DENSURE_MSYSTEM_IS_SET="\"$(MSYSTEM)\"" -DMINGW_PREFIX="\"$(patsubst /%,%,$(MINGW_PREFIX))\"" \ -+ -DNOGDI -DHAVE_STRING_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\".exe\" - BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO - # invalidcontinue.obj allows Git's source code to close the same file - # handle twice, or to access the osfhandle of an already-closed stdout @@ config.mak.uname: ifeq ($(uname_S),MINGW) BASIC_LDFLAGS += -Wl,--dynamicbase endif @@ config.mak.uname: ifeq ($(uname_S),MINGW) prefix = $(MINGW_PREFIX) HOST_CPU = $(patsubst %-w64-mingw32,%,$(MINGW_CHOST)) BASIC_LDFLAGS += -Wl,--pic-executable -- COMPAT_CFLAGS += -DDETECT_MSYS_TTY -DENSURE_MSYSTEM_IS_SET -+ COMPAT_CFLAGS += -DDETECT_MSYS_TTY \ -+ -DENSURE_MSYSTEM_IS_SET="\"$(MSYSTEM)\"" \ -+ -DMINGW_PREFIX="\"$(patsubst /%,%,$(MINGW_PREFIX))\"" - ifeq (MINGW32,$(MSYSTEM)) - BASIC_LDFLAGS += -Wl,--large-address-aware - endif ## contrib/buildsystems/CMakeLists.txt ## @@ contrib/buildsystems/CMakeLists.txt: if(CMAKE_SYSTEM_NAME STREQUAL "Windows")233: 9abcf48 = 106: a69ae8d mingw: always define
ETC_*for MSYS2 environments234: 0cf99d9 = 107: 1129fe0 max_tree_depth: lower it for clang builds in general on Windows
27: 8700afe = 108: 23a8c95 mingw: ensure valid CTYPE
30: 373e851 ! 109: 939e919 mingw: allow
git.exeto be used instead of the "Git wrapper"32: c7533f1 = 110: c9daf75 mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory
35: d5b7ce3 = 111: 94f27cb clink.pl: fix libexpatd.lib link error when using MSVC
39: f02d652 = 112: 0e7e9b2 Makefile: clean up .ilk files when MSVC=1
40: 9b850e0 = 113: b905927 vcbuild: add support for compiling Windows resource files
41: 5cbcb6f = 114: 2e960e4 config.mak.uname: add git.rc to MSVC builds
42: b261826 = 115: 3d19409 clink.pl: ignore no-stack-protector arg on MSVC=1 builds
44: e1f7e03 ! 116: 6504869 clink.pl: move default linker options for MSVC=1 builds
46: da59d44 = 117: d4bc652 cmake: install headless-git.
86: d9920ea = 118: 4846187 git.rc: include winuser.h
109: 1d52d30 < -: ------------ max_tree_depth: lower it for clangarm64 on Windows
112: caa7ba0 (upstream: af39198) < -: ------------ mingw: avoid the comma operator
113: a4d3a73 (upstream: d22a488) < -: ------------ wincred: Avoid memory corruption
114: 4a21527 (upstream: b0d5c88) < -: ------------ cmake: stop trying to build the reftable and xdiff libraries
115: 4a6696e (upstream: 0458e8b) < -: ------------ ci(dockerized): do show the result of failing tests again
116: 5d9dc33 = 119: e1e39bf git-svn: mark it as unsupported by the Git for Windows project
117: f1870bb = 120: f33769f ci(macos): skip the
git p4tests118: 318047a = 121: f153204 Win32: make FILETIME conversion functions public
119: 325e614 = 122: 3ca6e76 Win32: dirent.c: Move opendir down
120: df5e38f = 123: 1307818 mingw: make the dirent implementation pluggable
122: c9e86db = 124: 78fc807 Win32: make the lstat implementation pluggable
124: 731539c = 125: 52937e3 mingw: add infrastructure for read-only file system level caches
121: 14143dd = 126: a983fd1 git-gui--askyesno: fix funny text wrapping
125: 7c1db29 ! 127: d5219bf mingw: add a cache below mingw's lstat and dirent implementations
123: f8b490a = 128: e43b297 git-gui--askyesno (mingw): use Git for Windows' icon, if available
126: 40938ff = 129: 7841a15 fscache: load directories only once
127: 6d8ff51 = 130: 534b4d1 fscache: add key for GIT_TRACE_FSCACHE
128: 8a50efe = 131: 3aea2e5 fscache: remember not-found directories
129: accdcbd = 132: a063a3b fscache: add a test for the dir-not-found optimization
130: b18f0e5 = 133: c6a1d46 add: use preload-index and fscache for performance
131: 1fe74fa = 134: 101718f dir.c: make add_excludes aware of fscache during status
132: 4c6b720 = 135: b36f530 fscache: make fscache_enabled() public
133: 452e4bd = 136: c05a407 dir.c: regression fix for add_excludes with fscache
134: e1d9f08 = 137: bc0a705 fetch-pack.c: enable fscache for stats under .git/objects
135: 66a160a = 138: 4cf77f3 checkout.c: enable fscache for checkout again
136: c4b82d9 = 139: 857a0d5 Enable the filesystem cache (fscache) in refresh_index().
137: d24c19f = 140: 0555530 fscache: use FindFirstFileExW to avoid retrieving the short name
138: 9ac9e20 = 141: 44c6b29 fscache: add GIT_TEST_FSCACHE support
139: 56acd73 = 142: 6784e9e fscache: add fscache hit statistics
140: a7f97ae = 143: 35652a3 unpack-trees: enable fscache for sparse-checkout
141: c789ac1 = 144: 7daf7fa status: disable and free fscache at the end of the status command
142: eefbd68 = 145: 6ae87a2 mem_pool: add GIT_TRACE_MEMPOOL support
143: d3cf820 = 146: 965494e fscache: fscache takes an initial size
144: 4e43298 = 147: aa87b16 fscache: update fscache to be thread specific instead of global
145: 4c5b1e3 = 148: 7e4634b fscache: teach fscache to use mempool
146: 6afb01b = 149: 5d3269c fscache: make fscache_enable() thread safe
147: a47d909 = 150: 778c05b fscache: teach fscache to use NtQueryDirectoryFile
148: c045384 = 151: 6e866f7 fscache: remember the reparse tag for each entry
149: 55caebc = 152: 257ad8f fscache: implement an FSCache-aware is_mount_point()
150: 7fcb2b7 = 153: 817abd6 clean: make use of FSCache
151: 496ea4b = 154: bc43c6e pack-objects (mingw): demonstrate a segmentation fault with large deltas
152: 8093ade ! 155: e0bb0fc mingw: support long paths
@@ Commit message While improved error checking is always active, long paths support must be explicitly enabled via 'core.longpaths' option. This is to prevent end - users to shoot themselves in the foot by checking out files that Windows + users from shooting themselves in the foot by checking out files that Windows Explorer, cmd/bash or their favorite IDE cannot handle. Test suite: @@ Commit message Signed-off-by: Karsten Blees <[email protected]> Signed-off-by: Stepan Kasal <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]> + Signed-off-by: Josh Soref <[email protected]> ## Documentation/config/core.adoc ## @@ Documentation/config/core.adoc: core.fscache:: @@ compat/mingw.c: int mingw_open (const char *filename, int oflags, ...) - wchar_t wfilename[MAX_PATH]; + wchar_t wfilename[MAX_LONG_PATH]; open_fn_t open_fn; + WIN32_FILE_ATTRIBUTE_DATA fdata; - DECLARE_PROC_ADDR(ntdll.dll, NTSTATUS, NTAPI, RtlGetLastNtStatus, void); @@ compat/mingw.c: int mingw_open (const char *filename, int oflags, ...) if (filename && !strcmp(filename, "/dev/null")) @@ compat/mingw.c: int mingw_open (const char *filename, int oflags, ...) + else if (xutftowcs_long_path(wfilename, filename) < 0) return -1; - fd = open_fn(wfilename, oflags, mode); + /* @@ compat/mingw.c: FILE *mingw_fopen (const char *filename, const char *otype) { int hide = needs_hiding(filename); @@ compat/mingw.c: int mingw_utime (const char *file_name, const struct utimbuf *ti return -1; /* must have write permission */ -@@ compat/mingw.c: char *mingw_mktemp(char *template) - wchar_t wtemplate[MAX_PATH]; - int offset = 0; - -+ /* we need to return the path, thus no long paths here! */ - if (xutftowcs_path(wtemplate, template) < 0) - return NULL; - @@ compat/mingw.c: static pid_t mingw_spawnve_fd(const char *cmd, const char **argv, char **deltaen if (*argv && !strcmp(cmd, *argv))153: 0c8f71e = 156: 4df4c8b Win32: fix 'lstat("dir/")' with long paths
154: f39a12a = 157: b8fb8c0 win32(long path support): leave drive-less absolute paths intact
155: 7a9af39 = 158: 5108b61 compat/fsmonitor/fsm-*-win32: support long paths
156: 7f78f8c = 159: d13aa68 clean: suggest using
core.longPathsif paths are too long to remove157: e8ec49f = 160: 75c9a0d mingw: Support
git_terminal_promptwith more terminals158: ad23120 = 161: 48631e1 compat/terminal.c: only use the Windows console if bash 'read -r' fails
159: c6161dd = 162: 6ed8853 mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
160: 0d976f7 = 163: c8a8772 strbuf_readlink: don't call readlink twice if hint is the exact link size
161: bc92f58 = 164: c00f264 strbuf_readlink: support link targets that exceed PATH_MAX
162: e3f79df = 165: ac035ff lockfile.c: use is_dir_sep() instead of hardcoded '/' checks
163: 8de7a37 = 166: 6d8f233 Win32: don't call GetFileAttributes twice in mingw_lstat()
164: 1a21b37 = 167: 737ad11 Win32: implement stat() with symlink support
165: f61d707 = 168: e64833d Win32: remove separate do_lstat() function
166: 1af64be = 169: 264325a Win32: let mingw_lstat() error early upon problems with reparse points
167: 418d5ff = 170: 59c9e23 mingw: teach fscache and dirent about symlinks
168: b07d268 = 171: 6b9ee97 Win32: lstat(): return adequate stat.st_size for symlinks
169: cc0eb8e = 172: 61d130e Win32: factor out retry logic
170: 5cd3507 = 173: a2de74c Win32: change default of 'core.symlinks' to false
171: 4de05f0 = 174: a1d0f3f Win32: add symlink-specific error codes
172: a74d76c = 175: 371fbd9 Win32: mingw_unlink: support symlinks to directories
173: 20109e2 = 176: 5e1fa35 Win32: mingw_rename: support renaming symlinks
174: fcaeac9 = 177: c5c5a1b Win32: mingw_chdir: change to symlink-resolved directory
175: 7ef5a5e = 178: 32fd784 Win32: implement readlink()
176: 4631988 = 179: 85dc713 mingw: lstat: compute correct size for symlinks
177: 53891f4 = 180: 5ea5a19 Win32: implement basic symlink() functionality (file symlinks only)
178: 914b5a8 = 181: 64f0b61 Win32: symlink: add support for symlinks to directories
179: e0f2297 = 182: ef80a1e mingw: try to create symlinks without elevated permissions
180: 96f34f8 = 183: 3979ab7 mingw: emulate stat() a little more faithfully
181: dcec765 = 184: 3691e9e mingw: special-case index entries for symlinks with buggy size
182: 3404c03 = 185: 5e432e7 mingw: introduce code to detect whether we're inside a Windows container
187: f8464ec = 186: ab106af Win32: symlink: move phantom symlink creation to a separate function
188: 74b0e01 = 187: ca8467d Introduce helper to create symlinks that knows about index_state
189: bd18984 = 188: c9f4d0c mingw: allow to specify the symlink type in .gitattributes
183: ae2f825 = 189: ada6887 mingw: when running in a Windows container, try to rename() harder
190: 6c651e6 = 190: 198b593 Win32: symlink: add test for
symlinkattribute184: d90febd = 191: 73c20fa mingw: move the file_attr_to_st_mode() function definition
191: 1f5deb0 = 192: da65298 mingw: explicitly specify with which cmd to prefix the cmdline
185: 25cea2a = 193: 845bfa7 mingw: Windows Docker volumes are not symbolic links
192: a36ee0d = 194: 4c4ce15 mingw: when path_lookup() failed, try BusyBox
186: 9e2baae = 195: 0e9a2a2 mingw: work around rename() failing on a read-only file
193: ad99b08 = 196: fc0a47f test-tool: learn to act as a drop-in replacement for
iconv194: b2ca295 = 197: bc8d94d tests(mingw): if
iconvis unavailable, usetest-helper --iconv195: 99f4a2d ! 198: 2f3b70f gitattributes: mark .png files as binary
196: aca812d = 199: 4453543 tests: move test PNGs into t/lib-diff/
197: 1f8c540 = 200: fb2fc45 tests: only override sort & find if there are usable ones in /usr/bin/
198: 1c392f5 = 201: 0d1d892 tests: use the correct path separator with BusyBox
199: f2638ab = 202: 78d5677 mingw: only use Bash-ism
builtin pwd -Wwhen available200: 74b42e2 = 203: a432140 tests (mingw): remove Bash-specific pwd option
201: 78084cd = 204: 34654b2 test-lib: add BUSYBOX prerequisite
202: 194fa5b = 205: 5435150 t5003: use binary file from t/lib-diff/
203: 5f77614 = 206: e78d797 t5532: workaround for BusyBox on Windows
204: 2ecb94f = 207: 1c6cc4f t5605: special-case hardlink test for BusyBox-w32
205: 4be9142 = 208: cdefdda t5813: allow for $PWD to be a Windows path
206: 7602832 = 209: e0ca06c t9200: skip tests when $PWD contains a colon
207: 367c0ca < -: ------------ mingw: add a Makefile target to copy test artifacts
208: 0a0232d = 210: 3359767 mingw: kill child processes in a gentler way
209: 75248bf ! 211: 45f857b mingw: optionally enable wsl compability file mode bits
210: 40965ca = 212: 93517b0 mingw: really handle SIGINT
211: 11ed93d < -: ------------ mingw: do not call xutftowcs_path in mingw_mktemp
212: 6f8bdde = 213: 63c8ebd Partially un-revert "editor: save and reset terminal after calling EDITOR"
220: 4739f76 ! 214: 1c0a7e7 Add a GitHub workflow to monitor component updates
213: 4e79029 = 215: e084de9 reset: reinstate support for the deprecated --stdin option
214: 0e6a045 = 216: 1904cea fsmonitor: reintroduce core.useBuiltinFSMonitor
222: ad9803b = 217: e08b703 dependabot: help keeping GitHub Actions versions up to date
215: 5fc4037 = 218: 23e9440 Describe Git for Windows' architecture [no ci]
216: 1b45425 = 219: 677de27 Modify the Code of Conduct for Git for Windows
217: 5e5b765 = 220: b2fe567 CONTRIBUTING.md: add guide for first-time contributors
218: 7dd942a = 221: 21a1601 README.md: Add a Windows-specific preamble
219: 03c83c5 = 222: e944b97 Add an issue template
221: 51b26a1 = 223: 1de126f Modify the GitHub Pull Request template (to reflect Git for Windows)
223: 2b06ab0 = 224: c818d9e SECURITY.md: document Git for Windows' policies
224: 392a65e < -: ------------ fixup! max_tree_depth: lower it for clangarm64 on Windows
226: e43f4c5 < -: ------------ mingw: remove the Makefile target to install test artifacts
235: 5e03825 < -: ------------ amend! mingw: support long paths
236: e7fda77 < -: ------------ Temporarily revert "mimalloc: adjust for building inside Git"
237: f5d8e28 < -: ------------ Temporarily revert "Import the source code of mimalloc"
239: 4286a23 < -: ------------ mimalloc: adjust for building inside Git
240: e644bd0 < -: ------------ fixup! Add a GitHub workflow to monitor component updates
Most of the "noise" is made by moving the patches from #5971 into the
ready-for-upstreamsub-thicket. (This is the reason why the commit that added the Makefile targetinstall-mingit-test-artifactswas dropped; That PR removed that target because it interfered with generalizations required to support all the build axes supported by the MSYS2 project.)Some patches were dropped because they touched
mingw_mktemp(), which upstream Git removed.Also, the worrisome-looking, mimalloc-related parts of the range-diff are simply my squashing the upgrade from v2.2.4 to v2.2.6 into the patch series that adds support for mimalloc and then uses it on Windows.
Finally, the range-diff gives the impression as if
max_tree_depth: lower it for clangarm64 on Windowswas dropped. However, that commit made it upstream and still it stayed around in Git for Windows, duplicating the added lines. Only the extra copy was dropped; The changes are still functional.