Rebase shears/next: 5 conflict(s) (5 skipped, 0 resolved) (#28398452803) - #277
Open
gitforwindowshelper[bot] wants to merge 332 commits into
Open
Rebase shears/next: 5 conflict(s) (5 skipped, 0 resolved) (#28398452803)#277gitforwindowshelper[bot] wants to merge 332 commits into
gitforwindowshelper[bot] wants to merge 332 commits into
Conversation
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 <dl3@pale-eds.co.uk> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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 <johannes.schindelin@gmx.de>
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 <chengzhuo5@qq.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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 <johannes.schindelin@gmx.de>
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 <stolee@gmail.com> Signed-off-by: Jeff Hostetler <git@jeffhostetler.com> Signed-off-by: Derrick Stolee <stolee@gmail.com>
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 <git@jeffhostetler.com> Signed-off-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
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 <stolee@gmail.com>
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 <stolee@gmail.com>
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 <stolee@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Derrick Stolee <stolee@gmail.com>
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 <jeffhost@microsoft.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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 <git@jeffhostetler.com> Signed-off-by; Jeff Hostetler <git@jeffhostetler.com> Signed-off-by: Derrick Stolee <stolee@gmail.com>
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 <mirth.hickford@gmail.com> Signed-off-by: Matthias Aßhauer <mha1993@live.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Although NTLM authentication is considered weak (extending even to
NTLMv2, which purportedly allows brute-forcing reasonably complex
8-character passwords in a matter of days, given ample compute
resources), it _is_ one of the authentication methods supported by
libcurl.
Note: The added test case *cannot* reuse the existing `custom_auth`
facility. The reason is that that facility is backed by an NPH script
("No Parse Headers"), which does not allow handling the 3-phase NTLM
authentication correctly (in my hands, the NPH script would not even be
called upon the Type 3 message, a "200 OK" would be returned, but no
headers, let alone the `git http-backend` output as payload). Having a
separate NTLM authentication script makes the exact workings clearer and
more readable, anyway.
Co-authored-by: Matthew John Cheetham <mjcheetham@outlook.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This will come in handy in the next commit. Signed-off-by: JiSeop Moon <zcube@zcube.kr> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Bert Belder <bertbelder@gmail.com>
Preparation for widening the delta-encoding API to size_t in subsequent commits, which is what lets pack-objects drop the cast_size_t_to_ulong() shims that 606c192 (odb, packfile: use size_t for streaming object sizes, 2026-05-08) had to leave behind in get_delta() and try_delta() because their downstream consumers were still narrow. The struct is private to diff-delta.c, so widening its fields in isolation is a no-op at runtime: the values stored continue to fit in 32 bits on Windows because the public API around it still truncates. Splitting it out keeps the API-change commit focused on caller updates. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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 <stolee@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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 <mha1993@live.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
NTLM authentication is relatively weak. This is the case even with the
default setting of modern Windows versions, where NTLMv1 and LanManager
are disabled and only NTLMv2 is enabled: NTLMv2 hashes of even
reasonably complex 8-character passwords can be broken in a matter of
days, given enough compute resources.
Even worse: On Windows, NTLM authentication uses Security Support
Provider Interface ("SSPI"), which provides the credentials without
requiring the user to type them in.
Which means that an attacker could talk an unsuspecting user into
cloning from a server that is under the attacker's control and extracts
the user's NTLMv2 hash without their knowledge.
For that reason, let's disallow NTLM authentication by default.
NTLM authentication is quite simple to set up, though, and therefore
there are still some on-prem Azure DevOps setups out there whose users
and/or automation rely on this type of authentication. To give them an
escape hatch, introduce the `http.<url>.allowNTLMAuth` config setting
that can be set to `true` to opt back into using NTLM for a specific
remote repository.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The `git_terminal_prompt()` function expects the terminal window to be attached to a Win32 Console. However, this is not the case with terminal windows other than `cmd.exe`'s, e.g. with MSys2's own `mintty`. Non-cmd terminals such as `mintty` still have to have a Win32 Console to be proper console programs, but have to hide the Win32 Console to be able to provide more flexibility (such as being resizeable not only vertically but also horizontally). By writing to that Win32 Console, `git_terminal_prompt()` manages only to send the prompt to nowhere and to wait for input from a Console to which the user has no access. This commit introduces a function specifically to support `mintty` -- or other terminals that are compatible with MSys2's `/dev/tty` emulation. We use the `TERM` environment variable as an indicator for that: if the value starts with "xterm" (such as `mintty`'s "xterm_256color"), we prefer to let `xterm_prompt()` handle the user interaction. The most prominent user of `git_terminal_prompt()` is certainly `git-remote-https.exe`. It is an interesting use case because both `stdin` and `stdout` are redirected when Git calls said executable, yet it still wants to access the terminal. When running inside a `mintty`, the terminal is not accessible to the `git-remote-https.exe` program, though, because it is a MinGW program and the `mintty` terminal is not backed by a Win32 console. To solve that problem, we simply call out to the shell -- which is an *MSys2* program and can therefore access `/dev/tty`. Helped-by: nalla <nalla@hamal.uberspace.de> Signed-off-by: Karsten Blees <blees@dcon.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
It is a known issue that a rename() can fail with an "Access denied" error at times, when copying followed by deleting the original file works. Let's just fall back to that behavior. Signed-off-by: JiSeop Moon <zcube@zcube.kr> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
On Windows, symbolic links actually have a type depending on the target: it can be a file or a directory. In certain circumstances, this poses problems, e.g. when a symbolic link is supposed to point into a submodule that is not checked out, so there is no way for Git to auto-detect the type. To help with that, we will add support over the course of the next commits to specify that symlink type via the Git attributes. This requires an index_state, though, something that Git for Windows' `symlink()` replacement cannot know about because the function signature is defined by the POSIX standard and not ours to change. So let's introduce a helper function to create symbolic links that *does* know about the index_state. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The sole caller (try_delta() in builtin/pack-objects.c) passes an unsigned long, which promotes safely, so no caller fixups are needed. Splitting it out keeps the diff_delta() / create_delta() widening, which does ripple to several callers, in its own commit. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The 'git survey' builtin provides several detail tables, such as "top files by on-disk size". The size of these tables defaults to 10, currently. Allow the user to specify this number via a new --top=<N> option or the new survey.top config key. Signed-off-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Commit 2406bf5 (Win32: detect unix socket support at runtime, 2024-04-03) introduced a runtime detection for whether the operating system supports unix sockets for Windows, but a mistake snuck into the tests. When building and testing Git without NO_UNIX_SOCKETS we currently skip t0301-credential-cache on Windows if unix sockets are supported and run the tests if they aren't. Flip that logic to actually work the way it was intended. Signed-off-by: Matthias Aßhauer <mha1993@live.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The new default of Git is to disable NTLM authentication by default. To help users find the escape hatch of that config setting, should they need it, suggest it when the authentication failed and the server had offered NTLM, i.e. if re-enabling it would fix the problem. Helped-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Accessing the Windows console through the special CONIN$ / CONOUT$ devices doesn't work properly for non-ASCII usernames an passwords. It also doesn't work for terminal emulators that hide the native console window (such as mintty), and 'TERM=xterm*' is not necessarily a reliable indicator for such terminals. The new shell_prompt() function, on the other hand, works fine for both MSys1 and MSys2, in native console windows as well as mintty, and properly supports Unicode. It just needs bash on the path (for 'read -s', which is bash-specific). On Windows, try to use the shell to read from the terminal. If that fails with ENOENT (i.e. bash was not found), use CONIN/OUT as fallback. Note: To test this, create a UTF-8 credential file with non-ASCII chars, e.g. in git-bash: 'echo url=http://täst.com > cred.txt'. Then in git-cmd, 'git credential fill <cred.txt' works (shell version), while calling git without the git-wrapper (i.e. 'mingw64\bin\git credential fill <cred.txt') mangles non-ASCII chars in both console output and input. Signed-off-by: Karsten Blees <blees@dcon.de>
In preparation for making this function a bit more complicated (to allow for special-casing the `ContainerMappedDirectories` in Windows containers, which look like a symbolic link, but are not), let's move it out of the header. Signed-off-by: JiSeop Moon <zcube@zcube.kr> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
On Windows, symbolic links have a type: a "file symlink" must point at a file, and a "directory symlink" must point at a directory. If the type of symlink does not match its target, it doesn't work. Git does not record the type of symlink in the index or in a tree. On checkout it'll guess the type, which only works if the target exists at the time the symlink is created. This may often not be the case, for example when the link points at a directory inside a submodule. By specifying `symlink=file` or `symlink=dir` the user can specify what type of symlink Git should create, so Git doesn't have to rely on unreliable heuristics. Signed-off-by: Bert Belder <bertbelder@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
On Windows, git repositories may have extra files which need cleaned (e.g., a build directory) that may be arbitrarily deep. Suggest using `core.longPaths` if such situations are encountered. Fixes: git-for-windows#2715 Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
The -W option is only understood by MSYS2 Bash's pwd command. We already make sure to override `pwd` by `builtin pwd -W` for MINGW, so let's not double the effort here. This will also help when switching the shell to another one (such as BusyBox' ash) whose pwd does *not* understand the -W option. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When running with BusyBox, we will want to avoid calling executables on the PATH that are implemented in BusyBox itself. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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 <johannes.schindelin@gmx.de>
At some stage, t5003-archive-zip wants to add a file that is not ASCII. To that end, it uses /bin/sh. But that file may actually not exist (it is too easy to forget that not all the world is Unix/Linux...)! Besides, we already have perfectly fine binary files intended for use solely by the tests. So let's use one of them instead. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In this time and age, AI is everywhere. However, it's sometimes not very easy to use. For green-field projects it works quite a bit better than for existing legacy projects. And Git's source code is _quite_ as legacy code as they come... 😁 Now, the only way how AI can be used efficiently with legacy code is by providing enough information by way of prompt context for the AI to have a chance to make any sense of the code. The structure and the architecture is, after all, not designed for AI, but rather the opposite: By virtue of having grown organically over two decades, there is no design that AI coding models would readily grasp. So here is a document that describes all kinds of aspects about this project. The idea is to help AI by providing information that it does not have ingrained in its weights. The idea is to provide information that a human prompter might take for granted, but no coding model will have been trained on specifically. Assisted-by: Claude Opus 4.5 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
While it may seem super convenient to some old Unix hands to simpy require Perl to be available when running the test suite, this is a major hassle on Windows, where we want to verify that Perl is not, actually, required in a NO_PERL build. As a super ugly workaround, we "install" a script into /usr/bin/perl reading like this: #!/bin/sh # We'd much rather avoid requiring Perl altogether when testing # an installed Git. Oh well, that's why we cannot have nice # things. exec c:/git-sdk-64/usr/bin/perl.exe "$@" The problem with that is that BusyBox assumes that the #! line in a script refers to an executable, not to a script. So when it encounters the line #!/usr/bin/perl in t5532's proxy-get-cmd, it barfs. Let's help this situation by simply executing the Perl script with the "interpreter" specified explicitly. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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 <johannes.schindelin@gmx.de>
When t5605 tries to verify that files are hardlinked (or that they are not), it uses the `-links` option of the `find` utility. BusyBox' implementation does not support that option, and BusyBox-w32's lstat() does not even report the number of hard links correctly (for performance reasons). So let's just switch to a different method that actually works on Windows. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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 <dstolee@microsoft.com>
Git for Windows uses MSYS2's Bash to run the test suite, which comes with benefits but also at a heavy price: on the plus side, MSYS2's POSIX emulation layer allows us to continue pretending that we are on a Unix system, e.g. use Unix paths instead of Windows ones, yet this is bought at a rather noticeable performance penalty. There *are* some more native ports of Unix shells out there, though, most notably BusyBox-w32's ash. These native ports do not use any POSIX emulation layer (or at most a *very* thin one, choosing to avoid features such as fork() that are expensive to emulate on Windows), and they use native Windows paths (usually with forward slashes instead of backslashes, which is perfectly legal in almost all use cases). And here comes the problem: with a $PWD looking like, say, C:/git-sdk-64/usr/src/git/t/trash directory.t5813-proto-disable-ssh Git's test scripts get quite a bit confused, as their assumptions have been shattered. Not only does this path contain a colon (oh no!), it also does not start with a slash. This is a problem e.g. when constructing a URL as t5813 does it: ssh://remote$PWD. Not only is it impossible to separate the "host" from the path with a $PWD as above, even prefixing $PWD by a slash won't work, as /C:/git-sdk-64/... is not a valid path. As a workaround, detect when $PWD does not start with a slash on Windows, and simply strip the drive prefix, using an obscure feature of Windows paths: if an absolute Windows path starts with a slash, it is implicitly prefixed by the drive prefix of the current directory. As we are talking about the current directory here, anyway, that strategy works. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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 <johannes.schindelin@gmx.de>
Includes touch-ups by 마누엘, Philip Oakley and 孙卓识. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
On Windows, the current working directory is pretty much guaranteed to contain a colon. If we feed that path to CVS, it mistakes it for a separator between host and port, though. This has not been a problem so far because Git for Windows uses MSYS2's Bash using a POSIX emulation layer that also pretends that the current directory is a Unix path (at least as long as we're in a shell script). However, that is rather limiting, as Git for Windows also explores other ports of other Unix shells. One of those is BusyBox-w32's ash, which is a native port (i.e. *not* using any POSIX emulation layer, and certainly not emulating Unix paths). So let's just detect if there is a colon in $PWD and punt in that case. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
With improvements by Clive Chan, Adric Norris, Ben Bodenmiller and Philip Oakley. Helped-by: Clive Chan <cc@clive.io> Helped-by: Adric Norris <landstander668@gmail.com> Helped-by: Ben Bodenmiller <bbodenmiller@hotmail.com> Helped-by: Philip Oakley <philipoakley@iee.org> Signed-off-by: Brendan Forster <brendan@github.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
…ITOR" In e3f7e01 (Revert "editor: save and reset terminal after calling EDITOR", 2021-11-22), we reverted the commit wholesale where the terminal state would be saved and restored before/after calling an editor. The reverted commit was intended to fix a problem with Windows Terminal where simply calling `vi` would cause problems afterwards. To fix the problem addressed by the revert, but _still_ keep the problem with Windows Terminal fixed, let's revert the revert, with a twist: we restrict the save/restore _specifically_ to the case where `vi` (or `vim`) is called, and do not do the same for any other editor. This should still catch the majority of the cases, and will bridge the time until the original patch is re-done in a way that addresses all concerns. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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 <philipoakley@iee.org> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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 <vdye@github.com> Helped-by: Matthew John Cheetham <mjcheetham@outlook.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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 <johannes.schindelin@gmx.de>
Rather than using private IFTTT Applets that send mails to this maintainer whenever a new version of a Git for Windows component was released, let's use the power of GitHub workflows to make this process publicly visible. This workflow monitors the Atom/RSS feeds, and opens a ticket whenever a new version was released. Note: Bash sometimes releases multiple patched versions within a few minutes of each other (i.e. 5.1p1 through 5.1p4, 5.0p15 and 5.0p16). The MSYS2 runtime also has a similar system. We can address those patches as a group, so we shouldn't get multiple issues about them. Note further: We're not acting on newlib releases, OpenSSL alphas, Perl release candidates or non-stable Perl releases. There's no need to open issues about them. Co-authored-by: Matthias Aßhauer <mha1993@live.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This is the recommended way on GitHub to describe policies revolving around security issues and about supported versions. Helped-by: Sven Strickroth <email@cs-ware.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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 <vdye@github.com>
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 <johannes.schindelin@gmx.de>
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 <johannes.schindelin@gmx.de>
Upstream Git does not test their tags with the expensive set of tests, so a couple of them seem quite broken for now, even so much as hanging indefinitely. It is outside of the responsibility of the Git for Windows project to fix upstream's own tests for platforms other than Windows, so let's not exercise them. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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 <johannes.schindelin@gmx.de>
…updates Start monitoring updates of Git for Windows' component in the open
Add a README.md for GitHub goodness. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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
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.
Workflow run
Rebase Summary: next
From: bf5afdecc1 (Merge 'readme' into HEAD, 2018-06-07) (07faa066bd..bf5afdecc1)
Skipped: 758e5fb (hash-object: demonstrate a >4GB/LLP64 problem, 2021-10-31)
Upstream equivalent: d1b74b6 (hash-object: demonstrate a >4GB/LLP64 problem, 2026-06-16)
Range-diff
1: 758e5fb ! 1: d1b74b6 hash-object: demonstrate a >4GB/LLP64 problem
@@ Commit message Signed-off-by: Philip Oakley <philipoakley@iee.email> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> + Signed-off-by: Junio C Hamano <gitster@pobox.com> ## t/t1007-hash-object.sh ## @@ t/t1007-hash-object.sh: test_expect_success 'setup' 'Skipped: 7809b68 (hash algorithms: use size_t for section lengths, 2021-11-12)
Upstream equivalent: 58823d4 (hash algorithms: use size_t for section lengths, 2026-06-16)
Range-diff
1: 7809b68 ! 1: 58823d4 hash algorithms: use size_t for section lengths
@@ Commit message Signed-off-by: Philip Oakley <philipoakley@iee.email> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> + Signed-off-by: Junio C Hamano <gitster@pobox.com> ## object-file.c ## @@ object-file.c: int parse_loose_header(const char *hdr, struct object_info *oi) @@ t/t1007-hash-object.sh: test_expect_success '--stdin outside of repository (uses ' -test_expect_failure EXPENSIVE,SIZE_T_IS_64BIT,!LONG_IS_64BIT \ -+test_expect_success EXPENSIVE,SIZE_T_IS_64BIT,!LONG_IS_64BIT \ ++test_expect_success EXPENSIVE,SIZE_T_IS_64BIT \ 'files over 4GB hash literally' ' test-tool genzeros $((5*1024*1024*1024)) >big && test_oid large5GB >expect &&Skipped: 9bacd42 (hash-object --stdin: verify that it works with >4GB/LLP64, 2021-12-06)
Upstream equivalent: 9729b5e (hash-object --stdin: verify that it works with >4GB/LLP64, 2026-06-16)
Range-diff
1: 9bacd42 ! 1: 9729b5e hash-object --stdin: verify that it works with >4GB/LLP64
@@ Commit message Signed-off-by: Philip Oakley <philipoakley@iee.email> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> + Signed-off-by: Junio C Hamano <gitster@pobox.com> ## t/t1007-hash-object.sh ## -@@ t/t1007-hash-object.sh: test_expect_success EXPENSIVE,SIZE_T_IS_64BIT,!LONG_IS_64BIT \ +@@ t/t1007-hash-object.sh: test_expect_success EXPENSIVE,SIZE_T_IS_64BIT \ test_cmp expect actual ' -+test_expect_success EXPENSIVE,SIZE_T_IS_64BIT,!LONG_IS_64BIT \ ++test_expect_success EXPENSIVE,SIZE_T_IS_64BIT \ + 'files over 4GB hash correctly via --stdin' ' + { test -f big || test-tool genzeros $((5*1024*1024*1024)) >big; } && + test_oid large5GB >expect &&Skipped: 3a16614 (hash-object: add another >4GB/LLP64 test case, 2021-12-06)
Upstream equivalent: 2fefea3 (hash-object: add another >4GB/LLP64 test case, 2026-06-16)
Range-diff
1: 3a16614 ! 1: 2fefea3 hash-object: add another >4GB/LLP64 test case
@@ Commit message Signed-off-by: Philip Oakley <philipoakley@iee.email> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> + Signed-off-by: Junio C Hamano <gitster@pobox.com> ## t/t1007-hash-object.sh ## -@@ t/t1007-hash-object.sh: test_expect_success EXPENSIVE,SIZE_T_IS_64BIT,!LONG_IS_64BIT \ +@@ t/t1007-hash-object.sh: test_expect_success EXPENSIVE,SIZE_T_IS_64BIT \ test_cmp expect actual ' -+test_expect_success EXPENSIVE,SIZE_T_IS_64BIT,!LONG_IS_64BIT \ ++test_expect_success EXPENSIVE,SIZE_T_IS_64BIT \ + 'files over 4GB hash correctly' ' + { test -f big || test-tool genzeros $((5*1024*1024*1024)) >big; } && + test_oid large5GB >expect &&Skipped: 9f841f9 (hash-object: add a >4GB/LLP64 test case using filtered input, 2021-12-07)
Upstream equivalent: d99e13d (hash-object: add a >4GB/LLP64 test case using filtered input, 2026-06-16)
Range-diff
1: 9f841f9 ! 1: d99e13d hash-object: add a >4GB/LLP64 test case using filtered input
@@ Commit message Signed-off-by: Philip Oakley <philipoakley@iee.email> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> + Signed-off-by: Junio C Hamano <gitster@pobox.com> ## t/t1007-hash-object.sh ## -@@ t/t1007-hash-object.sh: test_expect_success EXPENSIVE,SIZE_T_IS_64BIT,!LONG_IS_64BIT \ +@@ t/t1007-hash-object.sh: test_expect_success EXPENSIVE,SIZE_T_IS_64BIT \ test_cmp expect actual ' +# This clean filter does nothing, other than excercising the interface. +# We ensure that cleaning doesn't mangle large files on 64-bit Windows. -+test_expect_success EXPENSIVE,SIZE_T_IS_64BIT,!LONG_IS_64BIT \ ++test_expect_success EXPENSIVE,SIZE_T_IS_64BIT \ + 'hash filtered files over 4GB correctly' ' + { test -f big || test-tool genzeros $((5*1024*1024*1024)) >big; } && + test_oid large5GB >expect &&To: 2556d5a522 (Merge 'readme' into HEAD, 2018-06-07) (4a43695587..2556d5a522)
Statistics
Range-diff (click to expand)
1: 39f7ff6 = 1: ec1f1e8 ci(dockerized): reduce the PID limit for private repositories
2: 68015e8 = 2: 0d0ab17 mingw: skip symlink type auto-detection for network share targets
3: e5a8076 = 3: 4309a06 Merge branch 'fix-ci'
4: c1ce4b7 = 4: 30ec53f unix-socket: avoid leak when initialization fails
5: a2d8474 = 5: 8d756f5 Merge branch 'prevent-accidental-ntlm-exfiltration-via-symlinks'
6: b269df5 = 6: 0567fb7 grep: prevent
^$false match at end of file7: 1d9b2e7 = 7: adf62ee Merge branch 'v2.53.0.windows.3'
8: 5b38ae1 = 8: 92f5948 Merge branch 'fixes-from-the-git-mailing-list'
32: c14d750 = 9: 8ea3ad5 ci: bump actions/checkout from 6 to 7
9: 52d4470 = 10: c36849e ci(vs-build): adapt to Visual Studio 2026 default on windows-latest
10: e8fcdba = 11: 0b017cd vcpkg_install: detect lack of Git
11: 83302b2 = 12: b014eeb vcpkg_install: add comment regarding slow network connections
12: 5c5e503 = 13: 166071c vcbuild: install ARM64 dependencies when building ARM64 binaries
13: b23b85b = 14: 2a02801 vcbuild: add an option to install individual 'features'
14: eafbf88 = 15: 50b067a cmake: allow building for Windows/ARM64
15: 13fe87f = 16: 5260a88 ci(vs-build) also build Windows/ARM64 artifacts
16: 9c478b1 ! 17: 67065b9 Add schannel to curl installation
17: 9e37eea = 18: 24b8d26 cmake(): allow setting HOST_CPU for cross-compilation
18: e675014 = 19: 12c1f43 t9350: point out that refs are not updated correctly
19: 350a44f = 20: e1de873 CMake: default Visual Studio generator has changed
20: 5392597 = 21: e3f207e transport-helper: add trailing --
21: 80573ed = 22: ff831be mingw: demonstrate a
git addissue with NTFS junctions22: 7317b0a = 23: 798799a .gitignore: add Visual Studio CMakeSetting.json file
23: bc12178 = 24: 87aa3a7 t5505/t5516: allow running without
.git/branches/in the templates24: 87a131a = 25: 9e50042 remote-helper: check helper status after import/export
25: 834f115 = 26: 8241c5b strbuf_realpath(): use platform-dependent API if available
26: abcdece = 27: 38207b2 http: use new "best effort" strategy for Secure Channel revoke checking
27: f2aabc1 = 28: 23a1404 subtree: update
contrib/subtreetesttarget28: 408067b = 29: ba3614f CMakeLists: add default "x64-windows" arch for Visual Studio
30: e84ebb2 = 30: 1c18e88 mingw: include the Python parts in the build
31: daf0956 = 31: 6d55716 t5505/t5516: fix white-space around redirectors
33: 9fcfdda = 32: 2b4f310 Always auto-gc after calling a fast-import transport
34: e96f77a = 33: a77733d mingw: prevent regressions with "drive-less" absolute paths
35: b1b0c86 = 34: 3fe57f9 transport: optionally disable side-band-64k
36: 5bb4bc9 = 35: 82fb557 mingw: fix fatal error working on mapped network drives on Windows
37: 6809991 = 36: 34b86c4 clink.pl: fix MSVC compile script to handle libcurl-d.lib
38: 69d9140 = 37: 5689b3e mingw: implement a platform-specific
strbuf_realpath()39: 0d2c158 = 38: 4c3bc7d t3701: verify that we can add lots of files interactively
40: ca20a82 = 39: f8050b3 commit: accept "scissors" with CR/LF line endings
41: 9894cfb = 40: 5e19c1e t0014: fix indentation
42: c7e5435 = 41: 3beeaa0 git-gui: accommodate for intent-to-add files
43: 9214fb2 = 42: 604b2a5 mingw: allow for longer paths in
parse_interpreter()44: 6c79083 = 43: 7d6fd67 compat/vcbuild: document preferred way to build in Visual Studio
45: b8d2625 = 44: 70a1c36 http: optionally send SSL client certificate
46: 7d94750 = 45: bd9cc95 ci: run
contrib/subtreetests in CI builds47: 685aa92 = 46: 0532664 CMake: show Win32 and Generator_platform build-option values
49: 17cde87 = 47: 5862647 windows: skip linking
git-<command>for built-ins50: f423e6b = 48: 606c1e6 mingw: stop hard-coding
CC = gcc51: 894dae3 = 49: a631fcb mingw: drop the -D_USE_32BIT_TIME_T option
52: 26f49a1 = 50: 3d1c76b mingw: only use -Wl,--large-address-aware for 32-bit builds
53: 261cf4f = 51: c13dea3 mingw: avoid over-specifying
--pic-executable54: 6061657 = 52: 5e0ffcb mingw: set the prefix and HOST_CPU as per MSYS2's settings
55: 68ac507 = 53: 0ebeea1 mingw: only enable the MSYS2-specific stuff when compiling in MSYS2
56: 26db9f5 = 54: ac2b036 mingw: rely on MSYS2's metadata instead of hard-coding it
57: 1c03981 = 55: 6b09d3a mingw: always define
ETC_*for MSYS2 environments58: 606556d = 56: 668b199 max_tree_depth: lower it for clang builds in general on Windows
59: 56148a4 = 57: 3e2ee5a mingw: ensure valid CTYPE
60: 270d5aa = 58: 325c19f mingw: allow
git.exeto be used instead of the "Git wrapper"62: 794cdc9 = 59: a1a9d94 mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory
64: c2ca40d = 60: e2fb50f Merge branch 'dscho-avoid-d-f-conflict-in-vs-master'
66: bfd7d12 = 61: c1cfe14 clink.pl: fix libexpatd.lib link error when using MSVC
68: 8007be6 = 62: 9196018 Makefile: clean up .ilk files when MSVC=1
70: 2ca5717 = 63: c5832a1 vcbuild: add support for compiling Windows resource files
72: c4257ba = 64: 0352a7d config.mak.uname: add git.rc to MSVC builds
73: 50ac03a = 65: d245a9e MinGW: link as terminal server aware
76: d21c879 = 66: 8901886 clink.pl: ignore no-stack-protector arg on MSVC=1 builds
77: cdb1e39 = 67: d9626fe http: optionally load libcurl lazily
80: 5018141 = 68: 6575712 clink.pl: move default linker options for MSVC=1 builds
81: 87602c6 = 69: 5b52fb8 http: support lazy-loading libcurl also on Windows
29: e593be8 = 70: 7d3963e setup: properly use "%(prefix)/" when in WSL
84: 0920158 = 71: cc47a76 Add config option
windows.appendAtomically85: 1515e0f = 72: 91236fd cmake: install headless-git.
86: f4cfc50 = 73: e4bb608 http: when loading libcurl lazily, allow for multiple SSL backends
48: 06897b1 = 74: b1e3428 compat/mingw.c: do not warn when failing to get owner
89: e855359 = 75: 8fd0b8c mingw: $env:TERM="xterm-256color" for newer OSes
90: 177aeee = 76: fc45972 winansi: check result and Buffer before using Name
91: cc82fc3 = 77: 446f046 mingw: change core.fsyncObjectFiles = 1 by default
92: f37f418 = 78: 00e019d Fix Windows version resources
93: 16f07f6 = 79: a604114 status: fix for old-style submodules with commondir
94: d8df482 = 80: e122d32 git.rc: include winuser.h
95: eba5e21 = 81: 97d6ae3 mingw: do load libcurl dynamically by default
96: e5c7200 = 82: 5d2f0ae Add a GitHub workflow to verify that Git/Scalar work in Nano Server
97: 827f125 = 83: 8a01ef6 mingw: suggest
windows.appendAtomicallyin more cases98: 049ffe3 = 84: 031bdd0 win32: use native ANSI sequence processing, if possible
99: 9be558b = 85: a066f36 common-main.c: fflush stdout buffer upon exit
100: 011b33c = 86: 7952920 t5601/t7406(mingw): do run tests with symlink support
61: 619050b = 87: fede7ed revision: create mark_trees_uninteresting_dense()
63: 93799e7 = 88: 630c190 survey: stub in new experimental 'git-survey' command
65: d1ed8b5 = 89: 4763796 survey: add command line opts to select references
118: 667f1f5 = 90: f108576 mingw: Support
git_terminal_promptwith more terminals67: 7b51ea0 = 91: 47606f7 survey: start pretty printing data in table form
120: e785f29 = 92: a177462 compat/terminal.c: only use the Windows console if bash 'read -r' fails
69: 23225f3 = 93: 086c545 survey: add object count summary
122: 6f48b65 = 94: 55d4460 mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
71: 93f03b4 = 95: c8fad88 survey: summarize total sizes by object type
124: 6811266 = 96: d8eca1e Win32: symlink: move phantom symlink creation to a separate function
74: 04efebe = 97: 384ad18 survey: show progress during object walk
75: b1ff519 = 98: 9fc417d mingw: make sure
errnois set correctly when socket operations fail126: 9cc1758 = 99: 4dedd88 t5563: verify that NTLM authentication works
127: 748dd1f = 100: 7576417 mingw: introduce code to detect whether we're inside a Windows container
128: 08369fb = 101: f58b74b Introduce helper to create symlinks that knows about index_state
78: affd3a0 = 102: 49128b4 survey: add ability to track prioritized lists
79: b065d2e = 103: 9e752e5 compat/mingw: handle WSA errors in strerror
130: 9720c36 = 104: 2e67781 http: disallow NTLM authentication by default
131: 851f972 = 105: e303d1b mingw: when running in a Windows container, try to rename() harder
132: a2a78f1 = 106: 6fec458 mingw: allow to specify the symlink type in .gitattributes
107: 75196b8 = 107: a39fa9e diff-delta: widen struct delta_index size fields to size_t
82: dee41c5 = 108: a794392 survey: add report of "largest" paths
83: e4fca12 = 109: 7f74176 compat/mingw: drop outdated comment
134: fc7a7ec = 110: 12ab9b1 http: warn if might have failed because of NTLM
135: 9f996ce = 111: a46b738 mingw: move the file_attr_to_st_mode() function definition
136: c414157 = 112: cf68fac Win32: symlink: add test for
symlinkattribute108: 63ad85d = 113: 4d67552 delta: widen create_delta_index() parameter to size_t
87: 0718932 = 114: aaed488 survey: add --top= option and config
88: 10a5539 = 115: 6ba476a t0301: actually test credential-cache on Windows
138: 2cf5d26 = 116: 21a2f0f credential: advertise NTLM suppression and allow helpers to re-enable
139: 51833fc = 117: 66b4012 mingw: Windows Docker volumes are not symbolic links
140: 43499f8 = 118: c48aa2e clean: do not traverse mount points
109: 7e00183 = 119: 005a60e pack-objects: widen delta-cache accounting to size_t
101: c163fba = 120: b9fdf1e Fallback to AppData if XDG_CONFIG_HOME is unset
102: 6e89f8f = 121: c021bb6 run-command: be helpful with Git LFS fails on Windows 7
103: 94c5220 = 122: a092214 survey: clearly note the experimental nature in the output
104: 1e1e6ad = 123: a027db4 credential-cache: handle ECONNREFUSED gracefully
105: 6bcc590 ! 124: ce1e4a7 reftable: do make sure to use custom allocators
106: c4224df = 125: 3376334 check-whitespace: avoid alerts about upstream commits
143: 6d072fa = 126: 724a1c7 t/t5571-prep-push-hook.sh: Add test with writing to stderr
144: de4df03 = 127: b3e669e dir: do not traverse mount points
145: 9838a8a = 128: 85656ff win32: thread-utils: handle multi-socket systems
146: 3b9e760 = 129: 811c23a t5563: add tests for http.emptyAuth with Negotiate
147: fb796fa = 130: d395cb8 entry: flush fscache after creating directories and writing files
148: 052f384 = 131: cf608f5 ci(macos): skip the
git p4tests149: cc80acf = 132: 4cd3040 mingw: work around rename() failing on a read-only file
150: 8255f90 = 133: 1370d84 clean: remove mount points when possible
151: 454aa0e = 134: e8240e6 mingw: optionally enable wsl compability file mode bits
152: 3b9da2c ! 135: 72033c5 Refuse to follow invalid paths in
.gitfiles@@ setup.c: const char *read_gitfile_gently(const char *path, int *return_error_cod } +#if (defined _WIN32 || defined __WIN32__) + if (is_dir_sep(dir[0]) && is_invalid_dotgit_path(path, dir)) { ++ strbuf_reset(&realpath); + strbuf_add(&realpath, dir, strlen(dir)); + path = realpath.buf; + goto cleanup_return; @@ setup.c: const char *read_gitfile_gently(const char *path, int *return_error_cod if (!is_git_directory(dir)) { error_code = READ_GITFILE_ERR_NOT_A_REPO; goto cleanup_return; + } + ++ strbuf_reset(&realpath); + strbuf_realpath(&realpath, dir, 1); + path = realpath.buf; + ## t/t5580-unc-paths.sh ## @@ t/t5580-unc-paths.sh: test_expect_success clone '110: 558e56f = 136: 0b28a8e pack-objects: widen free_unpacked() return to size_t
111: 1b88b47 = 137: 7a35ab3 pack-objects: widen mem_usage and try_delta out-param to size_t
112: 0f50e24 = 138: 84752fb delta: widen create_delta() and diff_delta() to size_t
113: 9c50669 = 139: bd4fd1d packfile, git-zlib: widen use_pack() and zstream avail fields to size_t
114: ebb4d1c = 140: d758e58 archive-zip: widen zlib_deflate_raw()'s maxsize local to size_t
115: 0cbc408 = 141: 04b6771 diff: widen deflate_it()'s bound local from int to size_t
116: 5ca4121 = 142: ba77879 http-push: widen start_put()'s size local from ssize_t to size_t
117: 48544f5 = 143: 5303f59 t/helper/test-pack-deltas: widen do_compress()'s maxsize local to size_t
119: 54a7a39 = 144: 5c61429 git-zlib: widen git_deflate_bound() to size_t
121: 0ae4977 = 145: a0b2797 diff: stop truncating the deflated-binary-diff size on Windows
123: 5ae86c0 = 146: bae4f04 convert: widen gather_convert_stats() helpers to size_t
125: d92d967 = 147: fc0ed0e read-cache: stop truncating index blob sizes on Windows
129: 0eea554 = 148: c7193a7 xdiff-interface: widen buffer_is_binary() size parameter to size_t
133: a9ed0bc = 149: e3be49a combine-diff: stop truncating combined-diff blob sizes on Windows
153: 75d477e = 150: cc7ddce tree-walk: drop link_len cast in get_tree_entry_follow_symlinks()
137: df7004d = 151: 40aa2c2 diff: widen textconv_object() size out-param to size_t
141: bb8ffc5 = 152: c52adb4 pack-bitmap: stop truncating blob sizes used by --filter=blob:limit
154: ab81a49 = 153: 35ee36e Merge branch 'size-t/pack-objects-delta'
155: a25b149 = 154: cb3fca5 tree-walk: widen init_tree_desc() and init_tree_desc_gently() to size_t
142: b81781a = 155: ca32711 diffcore: widen struct diff_filespec.size to size_t
156: a763101 = 156: e52449f Merge branch 'size-t/pack-bitmap'
157: 1d768b6 = 157: 6f7803a pack-objects: drop the two tree-walk casts in the preferred-base path
158: 4595d89 = 158: 5fb8b2a diff-delta: widen sizeof_delta_index() return to size_t
159: edea7a9 = 159: 2adcc13 Merge branch 'size-t/diff'
160: 61a9e47 = 160: 64fd108 tree: widen struct tree.size and parse_tree_buffer() to size_t
161: ff52de6 = 161: 67f62bc Merge branch 'size-t/diff-delta-sizeof'
162: 469f597 = 162: 0c5cd17 commit: widen the commit-buffer API to size_t
163: 689ad88 = 163: a034c7f Merge branch 'size-t/tree'
164: 4e0a601 = 164: 322837b blame: widen find_line_starts() len parameter to size_t
165: 607f857 = 165: f3158b9 Merge branch 'size-t/commit'
166: a9dd693 = 166: 79567d3 grep: widen struct grep_source.size and grep_buffer() to size_t
167: f362e36 = 167: e530dc0 Merge branch 'size-t/blame'
168: b7d8677 = 168: 7cd5b39 fast-export: drop the export_blob() size cast and widen anonymize_blob()
169: 4d38f44 = 169: 3d20bc8 Merge branch 'size-t/grep'
170: 2fbdcbf = 170: 451fdb2 repo: drop the inflated-size cast in count_objects()
172: 4792276 = 171: 3a8276b unpack-objects: widen the size-passing infrastructure to size_t
171: 320de95 = 172: 72d9885 Merge branch 'size-t/fast-export'
173: 222de05 = 173: e8001a2 Merge branch 'size-t/repo'
174: 2bc2ba1 = 174: d1e1ae6 Merge branch 'size-t/unpack-objects'
175: 0063e32 = 175: 7c992ae Merge branch 'topic/size-t' into size-t-followups
176: 46b96f0 = 176: 213373c pack-objects: drop cast_size_t_to_ulong shims in get_delta()
177: 23ecbfd = 177: 88db5fe pack-objects: drop cast_size_t_to_ulong shims in try_delta()
178: 2b4267c = 178: b2ca540 pack-objects: drop the last size shim in write_no_reuse_object()
179: 9130e1d = 179: dbe142d blame: widen struct blame_scoreboard.final_buf_size to size_t
180: 3e69ce8 = 180: afa5ba8 fast-import: drop the six size casts in the object-read paths
181: 111ac47 = 181: 130cb89 t/helper/test-pack-deltas: drop the delta_size cast in write_ref_delta()
184: 7fa5c9d = 182: 80ca196 Merge branch 'bump-ci-actions/checkout-from-6-to-7'
182: 2d16187 = 183: 4f40162 Drop the
cast_size_t_to_ulong()helper183: f5240ef = 184: 6f38ea4 Merge branch 'topic/size-t' (size_t evacuation, upstream-bound)
187: 71f39ea = 185: 4c0efea Merge 'remote-hg-prerequisites' into HEAD
185: 665686a = 186: 1546298 Merge branch 'topic/size-t-followups' (size_t followups depending on seen topics)
186: 0e59b5d = 187: 097e035 coverity: skip building with Rust, for now
188: 0962773 = 188: e796793 Merge branch 'drive-prefix'
189: e20a6b7 = 189: 66b33a8 Merge branch 'msys2-python'
190: 88df58f = 190: 6477644 Merge pull request Config option to disable side-band-64k for transport git#2375 from assarbad/reintroduce-sideband-config
191: 4295543 = 191: 04c56a1 Merge pull request mingw: fix fatal error working on mapped network drives on Windows git#2488 from bmueller84/master
192: a9d998e = 192: ad3155b Merge pull request clink.pl: fix MSVC compile script to handle libcurl-d.lib git#2501 from jeffhostetler/clink-debug-curl
193: 5d0904c = 193: 03ec495 Merge pull request Handle
git add <file>where <file> traverses an NTFS junction git#2504 from dscho/access-repo-via-junction194: d1813f8 = 194: 591ac88 Merge pull request Introduce and use the new "best effort" strategy for Secure Channel revoke checking git#2535 from dscho/schannel-revoke-best-effort
195: 3eb2153 = 195: 28ea488 Merge pull request ci: avoid d/f conflict in vs/master git#2618 from dscho/avoid-d/f-conflict-in-vs/master
196: 5b83d56 = 196: a801e5d Merge 'add-p-many-files'
197: 0d2bf81 = 197: 8f6c3fe Merge pull request Rationalize line endings for scissors-cleanup git#2714 from lbonanomi/crlf-scissors
198: a17f284 = 198: 0b2be3d Merge pull request t/t0014: fix: eliminate additional lines from trace git#2655 from jglathe/jg/t0014_trace_extra_info
199: 9eb6981 = 199: 8e77323 Merge 'git-gui/js/intent-to-add'
200: c571bd1 = 200: 66740ab Merge pull request Vcpkg Install: detect lack of working Git, and note possible vcpkg time outs git#2351 from PhilipOakley/vcpkg-tip
201: 50940d4 = 201: 3a2f8bd Merge pull request Windows arm64 support git#2915 from dennisameling/windows-arm64-support
202: 1dfdf7d = 202: d41d67c Merge pull request cmake(): allow setting HOST_CPU for cross-compilation git#3327 from dennisameling/fix-host-cpu
203: d584214 = 203: 502b92e Merge pull request mingw: allow for longer paths in
parse_interpreter()git#3165 from dscho/increase-allowed-length-of-interpreter-path204: 80ab7dd = 204: 32e1579 Merge pull request Let the documentation reflect that there is no vs/master anymore git#3220 from dscho/there-is-no-vs/master-anymore
205: 193a157 = 205: 7f552d6 Merge pull request http: Add support for enabling automatic sending of SSL client certificate git#3293 from pascalmuller/http-support-automatically-sending-client-certificate
206: 3e1b64a = 206: 634caa9 Merge pull request Add
contrib/subtreetest execution to CI builds git#3349 from vdye/feature/ci-subtree-tests207: 0a4a24e = 207: 9fe682d Merge pull request Make Git for Windows start builds in modern Visual Studio git#3306 from PhilipOakley/vs-sln
208: 22a5aa2 = 208: e4401f6 Merge pull request Various fixes around
safe.directorygit#3791: Various fixes aroundsafe.directory209: 2b89fb8 = 209: 143a505 Merge pull request mingw: set $env:TERM=xterm-256color for newer OSes git#3751 from rkitover/native-term
210: 0c9f4fa = 210: 2052266 Merge pull request winansi: check result before using Name for pty git#3875 from 1480c1/wine/detect_msys_tty
211: 3d0bf72 = 211: 6e90969 Merge branch 'optionally-dont-append-atomically-on-windows'
212: 1e65fc7 = 212: 2ddaa66 Merge branch 'fsync-object-files-always'
213: 9c8bc2a = 213: 1e80c23 Merge pull request MinGW: link as terminal server aware git#3942 from rimrul/mingw-tsaware
214: 5ebbe24 = 214: 156038b Fix Windows version resources (Fix Windows version resources git#4092)
215: 8221b1d = 215: b4a100d Fix global repository field not being cleared (Fix global repository field not being cleared git#4083)
216: e43e134 = 216: 9ff5f29 Skip linking the "dashed"
git-<command>s for built-ins (Skip linking the "dashed"git-<command>s for built-ins git#4252)217: 68e7261 = 217: f9fb6f8 Add full
mingw-w64-git(i.e. regular MSYS2 ecosystem) support (Add fullmingw-w64-git(i.e. regular MSYS2 ecosystem) support git#5971)218: 026b3af = 218: f41e8ab Merge pull request Allow running Git directly from
C:\Program Files\Git\mingw64\bin\git.exegit#2506 from dscho/issue-2283219: 6503a43 = 219: 6cb584e Merge pull request Include Windows-specific maintenance and headless-git git#2974 from derrickstolee/maintenance-and-headless
220: 13c21a3 = 220: f63868e ARM64: Embed manifest properly (ARM64: Embed manifest properly git#4718)
221: 7f829ff = 221: 1cbee13 Lazy load libcurl, allowing for an SSL/TLS backend-specific libcurl (Lazy load libcurl, allowing for an SSL/TLS backend-specific libcurl git#4410)
222: ffec180 = 222: e1eef76 Merge branch 'nano-server'
223: f37a8c6 = 223: 091c8a4 Additional error checks for issuing the windows.appendAtomically warning (Additional error checks for issuing the windows.appendAtomically warning git#4528)
224: c66c4b7 = 224: a654169 win32: use native ANSI sequence processing, if possible (win32: use native ANSI sequence processing, if possible git#4700)
225: 64bc087 = 225: 860f8d9 common-main.c: fflush stdout buffer when exit (common-main.c: fflush stdout buffer when exit git#4901)
226: 666ca22 = 226: 6a68aad Merge branch 'run-t5601-and-t7406-with-symlinks-on-windows-10'
227: bd8d0c9 = 227: 711c3da Merge branch 'Fallback-to-AppData-if-XDG-CONFIG-HOME-is-unset'
228: 35c35b8 = 228: a85b9fa Merge branch 'run-command-be-helpful-when-Git-LFS-fails-on-Windows-7'
229: 585f0bc = 229: cf3ce16 Add path walk API and its use in 'git pack-objects' (Add path walk API and its use in 'git pack-objects' git#5171)
230: 9257e9a = 230: f036404 Add experimental 'git survey' builtin (Add experimental 'git survey' builtin git#5174)
231: 6e9793d = 231: e36bd58 credential-cache: handle ECONNREFUSED gracefully (credential-cache: handle ECONNREFUSED gracefully git#5329)
232: ae053d7 = 232: ed01360 Merge branch 'reftable-vs-custom-allocators'
233: 77e5308 = 233: e5d4681 Merge branch 'check-whitespace-only-downstream'
234: 5437854 = 234: 95258d4 t/t5571-prep-push-hook.sh: Add test with writing to stderr (t/t5571-prep-push-hook.sh: Add test with writing to stderr git#6063)
235: 118e1a8 = 235: fa3b667 Merge branch 'disallow-ntlm-auth-by-default'
236: 58491a3 = 236: bb761d3 Don't traverse mount points in
remove_dir_recurse()(Don't traverse mount points inremove_dir_recurse()git#6151)237: 647ba8c = 237: b067ef4 Detect number of cores better on multi-socket systems (Detect number of cores better on multi-socket systems git#6108)
238: b0bd283 = 238: 2672742 http: fix emptyAuth=auto for Negotiate/SPNEGO (http: fix emptyAuth=auto for Negotiate/SPNEGO git#6170)
239: f04ba1d = 239: 49aa51f entry: flush fscache after creating directories and writing files (entry: flush fscache after creating directories and writing files git#6250)
240: eb48bec = 240: 4da94f8 ci(macos): skip the
git p4tests (ci(macos): skip thegit p4tests git#5954)241: 0c1cb5e = 241: b9790bc Merge branch 'msys2'
242: 8e082bc = 242: 8c5c40b Merge 'docker-volumes-are-no-symlinks'
243: ce4c0c1 = 243: 1640de9 mingw: try resetting the read-only bit if rename fails (Reset READONLY if rename fails git#4527)
244: 1f0fc10 = 244: 6459a93 Merge pull request Specify symlink type in .gitattributes git#1897 from piscisaureus/symlink-attr
245: c0b05ec = 245: 995e088 Merge branch 'dont-clean-junctions'
246: 6a7a602 = 246: 9295d5a Merge branch 'wsl-file-mode-bits'
247: 3cb271f = 247: 022b7ce Merge branch 'validate-dotgit'
248: 190d2b5 = 248: 4ce0652 Continue improving support for 4GB+ packs/clones/objects (Continue improving support for 4GB+ packs/clones/objects git#6289)
249: 29a67e0 = 249: 2143f3a Merge branch 'skip-rust-in-the-coverity-builds'
250: 3045b30 = 250: 62b0f59 Merge branch 'ready-for-upstream'
253: a2a0294 = 251: 3044c7d Win32: make FILETIME conversion functions public
254: 72ae9dc = 252: 2e7ffd8 Win32: dirent.c: Move opendir down
255: 474a7a4 = 253: 0d59aaf mingw: make the dirent implementation pluggable
256: db3fbbd = 254: bf520de Win32: make the lstat implementation pluggable
257: d537b4a = 255: d08f349 mingw: add infrastructure for read-only file system level caches
258: 057780c = 256: 2cd5188 mingw: add a cache below mingw's lstat and dirent implementations
259: 80f4317 = 257: 64d8367 fscache: load directories only once
260: 324070e = 258: 79fd872 fscache: add key for GIT_TRACE_FSCACHE
261: 112d928 = 259: fbc1212 fscache: remember not-found directories
262: 86793fd = 260: 4dff23e fscache: add a test for the dir-not-found optimization
263: f9e0cfb = 261: a15df67 add: use preload-index and fscache for performance
264: 4391aa1 = 262: 4879a29 dir.c: make add_excludes aware of fscache during status
265: 3b73b21 = 263: 9edb7d8 fscache: make fscache_enabled() public
266: 4d1e259 = 264: d1440f4 dir.c: regression fix for add_excludes with fscache
267: 0f47f2d = 265: 90801e8 fetch-pack.c: enable fscache for stats under .git/objects
268: a3d63fe = 266: d730934 checkout.c: enable fscache for checkout again
251: 2f6642c = 267: 2b91eba git-gui--askyesno: fix funny text wrapping
269: 2db57af = 268: c3718c2 Enable the filesystem cache (fscache) in refresh_index().
252: 0a955ee = 269: 5acb1e7 git-gui--askyesno (mingw): use Git for Windows' icon, if available
270: 4474908 = 270: 920f1f5 fscache: use FindFirstFileExW to avoid retrieving the short name
271: 3af59eb = 271: 53abd9c fscache: add GIT_TEST_FSCACHE support
272: 7105b32 = 272: 6d5600d fscache: add fscache hit statistics
273: 635bc86 = 273: 7005e35 unpack-trees: enable fscache for sparse-checkout
274: 95b84c0 = 274: cd3d551 status: disable and free fscache at the end of the status command
275: dd41178 = 275: b48631f mem_pool: add GIT_TRACE_MEMPOOL support
276: c4bc523 = 276: 930b3aa fscache: fscache takes an initial size
277: 7a35491 = 277: 3d4c573 fscache: update fscache to be thread specific instead of global
278: 649256b = 278: 950d524 fscache: teach fscache to use mempool
279: 4462152 = 279: 9badb4d fscache: make fscache_enable() thread safe
280: 156b584 = 280: d9a4317 fscache: teach fscache to use NtQueryDirectoryFile
281: 54bc9ac = 281: cd76cc7 fscache: remember the reparse tag for each entry
282: 77a5e07 = 282: 5ef93b6 fscache: Windows Docker volumes are not symbolic links
283: 378935b = 283: 77fba39 fscache: optionally enable wsl compability file mode bits
284: e75ad5e = 284: 9535dc5 Merge branch 'fscache'
285: 9d9bd31 = 285: 8c9447f fscache: implement an FSCache-aware is_mount_point()
286: 0868640 = 286: 180b660 Merge pull request status: disable and free fscache at the end of the status command git#1909 from benpeart/free-fscache-after-status-gfw
287: c931833 = 287: f4daabc clean: make use of FSCache
288: e9dfc71 = 288: 7af6caa Merge remote-tracking branch 'benpeart/fscache-per-thread-gfw'
289: 98ab6f6 = 289: bdca552 Merge branch 'dont-clean-junctions-fscache'
290: c52ce6d = 290: e206ca6 pack-objects (mingw): demonstrate a segmentation fault with large deltas
291: af8afc9 = 291: 0df2252 mingw: support long paths
292: b494171 = 292: 8c51049 win32(long path support): leave drive-less absolute paths intact
293: 925fd34 = 293: c43efc0 compat/fsmonitor/fsm-*-win32: support long paths
294: 29346bb = 294: f446f1e clean: suggest using
core.longPathsif paths are too long to remove295: 32c070a = 295: fca954a mingw: explicitly specify with which cmd to prefix the cmdline
296: 2c9cc33 = 296: 856a000 mingw: when path_lookup() failed, try BusyBox
297: 32921af = 297: e5be091 test-tool: learn to act as a drop-in replacement for
iconv298: ce74922 = 298: 8341663 tests(mingw): if
iconvis unavailable, usetest-helper --iconv299: 0f4510f = 299: e2b20fa gitattributes: mark .png files as binary
300: a7145e3 = 300: fd85fbb tests: move test PNGs into t/lib-diff/
301: d0557c4 = 301: 97160e3 tests: only override sort & find if there are usable ones in /usr/bin/
302: b3a80a5 = 302: becc75f tests: use the correct path separator with BusyBox
303: 538275f = 303: 17cf4df mingw: only use Bash-ism
builtin pwd -Wwhen available304: 0bb9aad = 304: 0d4c23e tests (mingw): remove Bash-specific pwd option
305: 7ab6ec7 = 305: 15347b9 test-lib: add BUSYBOX prerequisite
306: 98bfdd4 = 306: dd9f1fe t5003: use binary file from t/lib-diff/
307: c3199c4 = 307: 15b0bcd t5532: workaround for BusyBox on Windows
308: 1f3c4a9 = 308: b880ad5 t5605: special-case hardlink test for BusyBox-w32
309: 5ce45b7 = 309: b1e4027 t5813: allow for $PWD to be a Windows path
310: 305cb51 = 310: 589302b t9200: skip tests when $PWD contains a colon
311: a28b403 = 311: d707dcc Describe Git for Windows' architecture
312: 451319d = 312: e68eb52 Add an AGENTS.md file to help with AI-assisted debugging/development
313: 74e0fd6 = 313: ba2497c Modify the Code of Conduct for Git for Windows
315: 85b0230 = 314: 88903e7 CONTRIBUTING.md: add guide for first-time contributors
314: 87b4cb9 = 315: 137c46a Merge branch 'gitk-and-git-gui-patches'
317: c319a60 = 316: 44e8643 README.md: Add a Windows-specific preamble
316: 643449e = 317: 482cf09 Merge branch 'long-paths'
320: dc11e51 = 318: 4a44c42 Add an issue template
318: 753c333 = 319: 834df0a Partially un-revert "editor: save and reset terminal after calling EDITOR"
319: d3e610c = 320: baf578f Merge branch 'busybox-w32'
323: 79e6ced = 321: c7447f9 Modify the GitHub Pull Request template (to reflect Git for Windows)
321: 97d39f3 = 322: 1abb977 reset: reinstate support for the deprecated --stdin option
322: 05fe62a = 323: 9fccc89 Merge branch 'un-revert-editor-save-and-reset'
324: 3aceba3 = 324: 4a50908 Add a GitHub workflow to monitor component updates
327: de375d8 = 325: 3a10181 SECURITY.md: document Git for Windows' policies
325: 356dd1f = 326: 1700378 fsmonitor: reintroduce core.useBuiltinFSMonitor
326: 167a7e4 = 327: e289431 Merge branch 'phase-out-reset-stdin'
328: ff79cc6 = 328: 9b933e0 dependabot: help keeping GitHub Actions versions up to date
330: c174258 = 329: e1a8ccd ci: only run the expensive tests in the Windows tests for now
329: a44c1dc = 330: c85fbfe Merge branch 'deprecate-core.useBuiltinFSMonitor'
331: dc931cf = 331: 4cabd85 Merge pull request Start monitoring updates of Git for Windows' components in the open git#2837 from dscho/monitor-component-updates
332: f4ab08e = 332: 2556d5a Merge 'readme' into HEAD
333: e906f0d < -: ---------- amend! Add schannel to curl installation
334: 7bc5b80 < -: ---------- Fix
vcpkg_install.bat(Fixvcpkg_install.batgit#6298)Truncated; see the full conflict report in the workflow run summary.