Rebase shears/seen: 1 conflict(s) (0 skipped, 1 resolved) (#26456238144)#204
Open
gitforwindowshelper[bot] wants to merge 288 commits into
Open
Rebase shears/seen: 1 conflict(s) (0 skipped, 1 resolved) (#26456238144)#204gitforwindowshelper[bot] wants to merge 288 commits into
gitforwindowshelper[bot] wants to merge 288 commits into
Conversation
While Git for Windows does not _ship_ Python (in order to save on bandwidth), MSYS2 provides very fine Python interpreters that users can easily take advantage of, by using Git for Windows within its SDK. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Thorough benchmarking with repacking a subset of linux.git (the commit history reachable from 93a6fef ([PATCH] fix the SYSCTL=n compilation, 2007-02-28), to be precise) suggest that this allocator is on par, in multi-threaded situations maybe even better than nedmalloc: `git repack -adfq` with mimalloc, 8 threads: 31.166991900 27.576763800 28.712311000 27.373859000 27.163141900 `git repack -adfq` with nedmalloc, 8 threads: 31.915032900 27.149883100 28.244933700 27.240188800 28.580849500 In a different test using GitHub Actions build agents (probably single-threaded, a core-strength of nedmalloc)): `git repack -q -d -l -A --unpack-unreachable=2.weeks.ago` with mimalloc: 943.426 978.500 939.709 959.811 954.605 `git repack -q -d -l -A --unpack-unreachable=2.weeks.ago` with nedmalloc: 995.383 952.179 943.253 963.043 980.468 While these measurements were not executed with complete scientific rigor, as no hardware was set aside specifically for these benchmarks, it shows that mimalloc and nedmalloc perform almost the same, nedmalloc with a bit higher variance and also slightly higher average (further testing suggests that nedmalloc performs worse in multi-threaded situations than in single-threaded ones). In short: mimalloc seems to be slightly better suited for our purposes than nedmalloc. Seeing that mimalloc is developed actively, while nedmalloc ceased to see any updates in eight years, let's use mimalloc on Windows instead. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Since commit 0c499ea (send-pack: demultiplex a sideband stream with status data, 2010-02-05) the send-pack builtin uses the side-band-64k capability if advertised by the server. Unfortunately this breaks pushing over the dump git protocol if used over a network connection. The detailed reasons for this breakage are (by courtesy of Jeff Preshing, quoted from https://groups.google.com/d/msg/msysgit/at8D7J-h7mw/eaLujILGUWoJ): MinGW wraps Windows sockets in CRT file descriptors in order to mimic the functionality of POSIX sockets. This causes msvcrt.dll to treat sockets as Installable File System (IFS) handles, calling ReadFile, WriteFile, DuplicateHandle and CloseHandle on them. This approach works well in simple cases on recent versions of Windows, but does not support all usage patterns. In particular, using this approach, any attempt to read & write concurrently on the same socket (from one or more processes) will deadlock in a scenario where the read waits for a response from the server which is only invoked after the write. This is what send_pack currently attempts to do in the use_sideband codepath. The new config option `sendpack.sideband` allows to override the side-band-64k capability of the server, and thus makes the dumb git protocol work. Other transportation methods like ssh and http/https still benefit from the sideband channel, therefore the default value of `sendpack.sideband` is still true. Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de> Signed-off-by: Oliver Schneider <oliver@assarbad.net> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In 1e64d18 (mingw: do resolve symlinks in `getcwd()`) a problem was introduced that causes git for Windows to stop working with certain mapped network drives (in particular, drives that are mapped to locations with long path names). Error message was "fatal: Unable to read current working directory: No such file or directory". Present change fixes this issue as discussed in git-for-windows#2480 Signed-off-by: Bjoern Mueller <bjoernm@gmx.de>
Update clink.pl to link with either libcurl.lib or libcurl-d.lib depending on whether DEBUG=1 is set. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
There is a Win32 API function to resolve symbolic links, and we can use that instead of resolving them manually. Even better, this function also resolves NTFS junction points (which are somewhat similar to bind mounts). This fixes git-for-windows#2481. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The native Windows HTTPS backend is based on Secure Channel which lets the caller decide how to handle revocation checking problems caused by missing information in the certificate or offline CRL distribution points. Unfortunately, cURL chose to handle these problems differently than OpenSSL by default: while OpenSSL happily ignores those problems (essentially saying "¯\_(ツ)_/¯"), the Secure Channel backend will error out instead. As a remedy, the "no revoke" mode was introduced, which turns off revocation checking altogether. This is a bit heavy-handed. We support this via the `http.schannelCheckRevoke` setting. In curl/curl#4981, we contributed an opt-in "best effort" strategy that emulates what OpenSSL seems to do. In Git for Windows, we actually want this to be the default. This patch makes it so, introducing it as a new value for the `http.schannelCheckRevoke" setting, which now becmes a tristate: it accepts the values "false", "true" or "best-effort" (defaulting to the last one). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The convention in Git project's shell scripts is to have white-space _before_, but not _after_ the `>` (or `<`). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This change enhances `git commit --cleanup=scissors` by detecting scissors lines ending in either LF (UNIX-style) or CR/LF (DOS-style). Regression tests are included to specifically test for trailing comments after a CR/LF-terminated scissors line. Signed-off-by: Luke Bonanomi <lbonanomi@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
For some reason, this test case was indented with 4 spaces instead of 1 horizontal tab. The other test cases in the same test script are fine. Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
As of Git v2.28.0, the diff for files staged via `git add -N` marks them as new files. Git GUI was ill-prepared for that, and this patch teaches Git GUI about them. Please note that this will not even fix things with v2.28.0, as the `rp/apply-cached-with-i-t-a` patches are required on Git's side, too. This fixes git-for-windows#2779 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
The vcpkg downloads may not succeed. Warn careful readers of the time out. A simple retry will usually resolve the issue. Signed-off-by: Philip Oakley <philipoakley@iee.email> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Git's regular Makefile mentions that HOST_CPU should be defined when cross-compiling Git: https://github.com/git-for-windows/git/blob/37796bca76ef4180c39ee508ca3e42c0777ba444/Makefile#L438-L439 This is then used to set the GIT_HOST_CPU variable when compiling Git: https://github.com/git-for-windows/git/blob/37796bca76ef4180c39ee508ca3e42c0777ba444/Makefile#L1337-L1341 Then, when the user runs `git version --build-options`, it returns that value: https://github.com/git-for-windows/git/blob/37796bca76ef4180c39ee508ca3e42c0777ba444/help.c#L658 This commit adds the same functionality to the CMake configuration. Users can now set -DHOST_CPU= to set the target architecture. Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
As reported in newren/git-filter-repo#225, it looks like 99 bytes is not really sufficient to represent e.g. the full path to Python when installed via Windows Store (and this path is used in the hasb bang line when installing scripts via `pip`). Let's increase it to what is probably the maximum sensible path size: MAX_PATH. This makes `parse_interpreter()` in line with what `lookup_prog()` handles. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Vilius Šumskas <vilius@sumskas.eu>
We used to have that `make vcxproj` hack, but a hack it is. In the meantime, we have a much cleaner solution: using CMake, either explicitly, or even more conveniently via Visual Studio's built-in CMake support (simply open Git's top-level directory via File>Open>Folder...). Let's let the `README` reflect this. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This adds support for a new http.sslAutoClientCert config value. In cURL 7.77 or later the schannel backend does not automatically send client certificates from the Windows Certificate Store anymore. This config value is only used if http.sslBackend is set to "schannel", and can be used to opt in to the old behavior and force cURL to send client certificates. This fixes git-for-windows#3292 Signed-off-by: Pascal Muller <pascalmuller@gmail.com>
Because `git subtree` (unlike most other `contrib` modules) is included as part of the standard release of Git for Windows, its stability should be verified as consistently as it is for the rest of git. By including the `git subtree` tests in the CI workflow, these tests are as much of a gate to merging and indicator of stability as the standard test suite. Signed-off-by: Victoria Dye <vdye@github.com>
Ensure key CMake option values are part of the CMake output to facilitate user support when tool updates impact the wider CMake actions, particularly ongoing 'improvements' in Visual Studio. These CMake displays perform the same function as the build-options.txt provided in the main Git for Windows. CMake is already chatty. The setting of CMAKE_EXPORT_COMPILE_COMMANDS is also reported. Include the environment's CMAKE_EXPORT_COMPILE_COMMANDS value which may have been propogated to CMake's internal value. Testing the CMAKE_EXPORT_COMPILE_COMMANDS processing can be difficult in the Visual Studio environment, as it may be cached in many places. The 'environment' may include the OS, the user shell, CMake's own environment, along with the Visual Studio presets and caches. See previous commit for arefacts that need removing for a clean test. Signed-off-by: Philip Oakley <philipoakley@iee.email>
To verify that the `clean` side of the `clean`/`smudge` filter code is correct with regards to LLP64 (read: to ensure that `size_t` is used instead of `unsigned long`), here is a test case using a trivial filter, specifically _not_ writing anything to the object store to limit the scope of the test case. As in previous commits, the `big` file from previous test cases is reused if available, to save setup time, otherwise re-generated. Signed-off-by: Philip Oakley <philipoakley@iee.email> 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>
This is no longer true in general, not with supporting Clang out of the box. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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>
This option was added in fa93bb2 (MinGW: Fix stat definitions to work with MinGW runtime version 4.0, 2013-09-11), i.e. a _long_ time ago. So long, in fact, that it still targeted MinGW. But we switched to mingw-w64 in 2015, which seems not to share the problem, and therefore does not require a fix. Even worse: This flag is incompatible with UCRT64, which we are about to support by way of upstreaming `mingw-w64-git` to the MSYS2 project, see msys2/MINGW-packages#26470 for details. So let's send that option into its well-deserved retirement. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Merge this early to resolve merge conflicts early. 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>
That option only matters there, and is in fact only really understood in those builds; UCRT64 versions of GCC, for example, do not know what to do with that option. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When building with `make MSVC=1 DEBUG=1`, link to `libexpatd.lib` rather than `libexpat.lib`. It appears that the `vcpkg` package for "libexpat" has changed and now creates `libexpatd.lib` for debug mode builds. Previously, both debug and release builds created a ".lib" with the same basename. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.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>
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>
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>
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>
The TerminateProcess() function does not actually leave the child processes any chance to perform any cleanup operations. This is bad insofar as Git itself expects its signal handlers to run. A symptom is e.g. a left-behind .lock file that would not be left behind if the same operation was run, say, on Linux. To remedy this situation, we use an obscure trick: we inject a thread into the process that needs to be killed and to let that thread run the ExitProcess() function with the desired exit status. Thanks J Wyman for describing this trick. The advantage is that the ExitProcess() function lets the atexit handlers run. While this is still different from what Git expects (i.e. running a signal handler), in practice Git sets up signal handlers and atexit handlers that call the same code to clean up after itself. In case that the gentle method to terminate the process failed, we still fall back to calling TerminateProcess(), but in that case we now also make sure that processes spawned by the spawned process are terminated; TerminateProcess() does not give the spawned process a chance to do so itself. Please note that this change only affects how Git for Windows tries to terminate processes spawned by Git's own executables. Third-party software that *calls* Git and wants to terminate it *still* need to make sure to imitate this gentle method, otherwise this patch will not have any effect. 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>
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>
This was pull request git-for-windows#1645 from ZCube/master Support windows container. 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>
The Windows Subsystem for Linux (WSL) version 2 allows to use `chmod` on NTFS volumes provided that they are mounted with metadata enabled (see https://devblogs.microsoft.com/commandline/chmod-chown-wsl-improvements/ for details), for example: $ chmod 0755 /mnt/d/test/a.sh In order to facilitate better collaboration between the Windows version of Git and the WSL version of Git, we can make the Windows version of Git also support reading and writing NTFS file modes in a manner compatible with WSL. Since this slightly slows down operations where lots of files are created (such as an initial checkout), this feature is only enabled when `core.WSLCompat` is set to true. Note that you also have to set `core.fileMode=true` in repositories that have been initialized without enabling WSL compatibility. There are several ways to enable metadata loading for NTFS volumes in WSL, one of which is to modify `/etc/wsl.conf` by adding: ``` [automount] enabled = true options = "metadata,umask=027,fmask=117" ``` And reboot WSL. It can also be enabled temporarily by this incantation: $ sudo umount /mnt/c && sudo mount -t drvfs C: /mnt/c -o metadata,uid=1000,gid=1000,umask=22,fmask=111 It's important to note that this modification is compatible with, but does not depend on WSL. The helper functions in this commit can operate independently and functions normally on devices where WSL is not installed or properly configured. Signed-off-by: xungeng li <xungeng@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Previously, we did not install any handler for Ctrl+C, but now we really want to because the MSYS2 runtime learned the trick to call the ConsoleCtrlHandler when Ctrl+C was pressed. With this, hitting Ctrl+C while `git log` is running will only terminate the Git process, but not the pager. This finally matches the behavior on Linux and on macOS. 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>
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>
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>
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>
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>
…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 <johannes.schindelin@gmx.de>
Specify symlink type in .gitattributes
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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 <johannes.schindelin@gmx.de>
Handle Ctrl+C in Git Bash nicely 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>
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>
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
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>
Add a README.md for GitHub goodness. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
…it-for-windows#6198) AI-assisted contributions are a reality of open source in 2025 and beyond. Contributors will use AI tools, and that includes the maintainers themselves. Over recent months, I have found AI increasingly useful for the kind of menial, tedious work that does not require much creativity but is highly boring when done by hand: resolving merge conflicts during merging-rebases, chasing down CI failures across platforms, adapting downstream patches to upstream API changes. To that end, I would like to have an `AGENTS.md` file in the code base that helps any LLM to understand the context of the project. A secondary goal of this is to preemptively help outside contributors. The risk is not AI usage per se, but low-quality AI slop: contributions where the human hits "accept" without sufficient context being available to the model (and without proper review by the human, we've all been there), resulting in changes that miss conventions, break patterns, or misunderstand the project's architecture. Git's source code is about as legacy as they come, having grown organically over two decades with no design that AI coding models would readily grasp from a narrow code sample alone. This `AGENTS.md` is designed to raise the floor on AI-assisted contributions by providing enough context that even when a human contributor fails to steer carefully, the model has the information it needs to produce something reasonable. It documents the repository structure, build process, test conventions, the object model and ODB internals, debugging techniques (Trace2, instrumenting tests, bisecting failures), the merging-rebase workflow, conflict resolution patterns, coding conventions (ASCII only, 80 columns, tabs), commit message expectations, and the GitGitGadget contribution workflow. This is information that a human might take for granted, but no coding model will have been trained on specifically. Similar `AGENTS.md` files have recently been added to other repositories in the Git for Windows project: [MINGW-packages](git-for-windows/MINGW-packages#194), [git-for-windows.github.io](git-for-windows/git-for-windows.github.io#88) and [msys2-runtime](git-for-windows/msys2-runtime@1e0ff37).
The downstream NTLM topic (883674c, "t5563: verify that NTLM authentication works") and upstream commit 7e98eb8 ("t5563: add tests for http.emptyAuth with Negotiate") both added SPNEGO tests to the end of t5563. When both topics landed in shears/seen, the SPNEGO tests were duplicated: the first set appears before the NTLM tests (from upstream), the second set after (from the downstream topic). Since GIT_TRACE_CURL appends to the trace file rather than overwriting it, the second set of tests sees the 401 responses from both runs. Test 21 (auto mode) expects 3 lines in trace-auto but finds 6 (3 + 3), and test 22 (false mode) expects 1 but finds 2 (1 + 1), causing all four macOS CI jobs to fail. Remove the duplicate second set; the first (upstream) copy is sufficient. Assisted-by: Claude Opus 4.6 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
…-for-windows#6232) This closes two gaps in the current `AGENTS.md` that came up while drafting git-for-windows#6231 and git-for-windows#2104: 1. The `Fixup Commits` section only covered `fixup!`. `amend!` has different semantics (replaces the target's commit message and combines diffs to produce any final state), and the "amend! whose body is the upstream commit and whose diff aligns the squashed result with that upstream commit" pattern is precisely how the first commit of git-for-windows#6231 anticipates the in-flight nedmalloc removal in `seen` as `e576abb9f8`. That pattern is undocumented today. 2. There is no top-level "Contributing to Git for Windows" section, only "Contributing to Upstream Git via GitGitGadget". The cross-fork `gh pr create` invocation, the conditions under which a PR is naturally a fixup/amend-only series against existing thicket commits, and the upstream-aligning `amend!` shape were all things I inferred from context rather than the guide. Add subsections that cover those gaps. Nothing in the existing text changes.
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: seen
From: c556687529 (AGENTS.md: document
amend!, fixup-only PRs, and direct GfW PRs (git-for-windows#6232), 2026-05-26) (cca22fbf57..c556687529)Resolved: c556687529 (AGENTS.md: document
amend!, fixup-only PRs, and direct GfW PRs (git-for-windows#6232), 2026-05-26)Resolved merge of PR git-for-windows#6232 (AGENTS.md additions): took HEAD for all non-AGENTS.md files (upstream state), kept rewritten side's new sections (amend! commits, fixup-only PRs, contributing to GfW) in AGENTS.md
Range-diff
1: c556687529 ! 1: 88de53b AGENTS.md: document
amend!, fixup-only PRs, and direct GfW PRs (AGENTS.md: documentamend!, fixup-only PRs, and direct GfW PRs git#6232)@@ Commit message Add subsections that cover those gaps. Nothing in the existing text changes. + + ## AGENTS.md ## + remerge CONFLICT (add/add): Merge conflict in AGENTS.md + index 8212eafdf1..98c2066e58 100644 + --- AGENTS.md + +++ AGENTS.md +@@ AGENTS.md: Make **only** the change the patch intended, but in the current location: + + Conflict markers make the file invalid code: + ``` +-<<<<<<< HEAD +-======= +->>>>>>> commit-hash + ``` + + **All three types of markers must be completely removed.** +@@ AGENTS.md: gets squashed into. + + Run affected tests before finalizing. + +-<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) +-================================ + ### `amend!` Commits + + A `fixup!` commit keeps the target's commit message and merely combines +@@ AGENTS.md: This is the preferred pattern for reverting a multi-commit downstream + feature. Order the fixups in **reverse** of the originals so each + revert applies cleanly to the worktree as you build the series. + +->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + ### Common Adaptation Patterns + + **Struct field moves**: When upstream moves fields between structs, update +@@ AGENTS.md: On Windows, `unsigned long` is 32 bits even on 64-bit systems. Use `size_t` + for sizes that may exceed 4GB. Be careful with format strings: use `PRIuMAX` + with a cast for `size_t` values. + +-<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) +-================================ + ## Contributing to Git for Windows + + The primary contribution path for this fork is a PR against +@@ AGENTS.md: upstream commit's diff is the canonical pattern. The next + merging-rebase that picks up the upstream commit will recognize the + two as byte-identical and collapse them. + +->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + ## Contributing to Upstream Git via GitGitGadget + + ### Overview + + ## Documentation/config/sideband.adoc ## + remerge CONFLICT (add/add): Merge conflict in Documentation/config/sideband.adoc + index b015866bf7..ddba93393c 100644 + --- Documentation/config/sideband.adoc + +++ Documentation/config/sideband.adoc +@@ + sideband.allowControlCharacters:: +-<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) + ifdef::with-breaking-changes[] + By default, control characters that are delivered via the sideband + are masked, except ANSI color sequences. This prevents potentially +@@ Documentation/config/sideband.adoc: endif::with-breaking-changes[] + sideband.<url>.*:: + Apply the `sideband.*` option selectively to specific URLs. The + same URL matching logic applies as for `http.<url>.*` settings. +-======= +- By default, control characters that are delivered via the sideband +- are masked, except ANSI color sequences. This prevents potentially +- unwanted ANSI escape sequences from being sent to the terminal. Use +- this config setting to override this behavior: +-+ +--- +- color:: +- Allow ANSI color sequences, line feeds and horizontal tabs, +- but mask all other control characters. This is the default. +- false:: +- Mask all control characters other than line feeds and +- horizontal tabs. +- true:: +- Allow all control characters to be sent to the terminal. +--- +->>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + + ## Makefile ## + remerge CONFLICT (content): Merge conflict in Makefile + index 224cefbfbd..9c6f6cfac5 100644 + --- Makefile + +++ Makefile +@@ Makefile: CLAR_TEST_SUITES += u-hashmap + CLAR_TEST_SUITES += u-list-objects-filter-options + CLAR_TEST_SUITES += u-mem-pool + CLAR_TEST_SUITES += u-mingw +-<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) + CLAR_TEST_SUITES += u-odb-inmemory +-======= +->>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + CLAR_TEST_SUITES += u-oid-array + CLAR_TEST_SUITES += u-oidmap + CLAR_TEST_SUITES += u-oidtree +@@ Makefile: $(MIMALLOC_OBJS): COMPAT_CFLAGS += \ + endif + endif + +-<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) + +-======= +->>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + ifdef OVERRIDE_STRDUP + COMPAT_CFLAGS += -DOVERRIDE_STRDUP + COMPAT_OBJS += compat/strdup.o + + ## compat/mingw.c ## + remerge CONFLICT (content): Merge conflict in compat/mingw.c + index 2bbacda529..940243e0a3 100644 + --- compat/mingw.c + +++ compat/mingw.c +@@ compat/mingw.c: int mingw_unlink(const char *pathname, int handle_in_use_error) + return -1; + + if (use_legacy_delete < 0) +-<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) + use_legacy_delete = git_env_bool("GIT_TEST_LEGACY_DELETE", 0); +-======= +- use_legacy_delete = !!getenv("GIT_TEST_LEGACY_DELETE"); +->>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + + if (try_delete_file(wpathname, use_legacy_delete)) + return 0; + + ## config.mak.dev ## + remerge CONFLICT (content): Merge conflict in config.mak.dev + index 4373f80f0a..f63449d912 100644 + --- config.mak.dev + +++ config.mak.dev +@@ config.mak.dev: ifndef USE_MIMALLOC + DEVELOPER_CFLAGS += -std=gnu99 + endif + endif +-<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) + endif +-======= +->>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + else + # FreeBSD cannot limit to C99 because its system headers unconditionally + # rely on C11 features. + + ## contrib/buildsystems/CMakeLists.txt ## + remerge CONFLICT (content): Merge conflict in contrib/buildsystems/CMakeLists.txt + index 893a4180fd..9077b187e5 100644 + --- contrib/buildsystems/CMakeLists.txt + +++ contrib/buildsystems/CMakeLists.txt +@@ contrib/buildsystems/CMakeLists.txt: if(CMAKE_SYSTEM_NAME STREQUAL "Windows") + add_compile_definitions(HAVE_ALLOCA_H NO_POSIX_GOODIES NATIVE_CRLF NO_UNIX_SOCKETS WIN32 + _CONSOLE DETECT_MSYS_TTY STRIP_EXTENSION=".exe" NO_SYMLINK_HEAD UNRELIABLE_FSTAT + NOGDI OBJECT_CREATION_MODE=1 __USE_MINGW_ANSI_STDIO=0 +-<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) + OVERRIDE_STRDUP MMAP_PREVENTS_DELETE USE_WIN32_MMAP +-======= +- USE_NED_ALLOCATOR OVERRIDE_STRDUP MMAP_PREVENTS_DELETE USE_WIN32_MMAP +->>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + HAVE_WPGMPTR HAVE_RTLGENRANDOM) + if(CMAKE_GENERATOR_PLATFORM STREQUAL "x64") + add_compile_definitions(ENSURE_MSYSTEM_IS_SET="MINGW64" MINGW_PREFIX="mingw64") +@@ contrib/buildsystems/CMakeLists.txt: if(CMAKE_SYSTEM_NAME STREQUAL "Windows") + compat/win32/trace2_win32_process_info.c + compat/win32/dirent.c + compat/win32/wsl.c +-<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) +-======= +- compat/nedmalloc/nedmalloc.c +->>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + compat/strdup.c + compat/win32/fscache.c) + set(NO_UNIX_SOCKETS 1) + + ## object-file.c ## + remerge CONFLICT (content): Merge conflict in object-file.c + index 200d31a254..0056c369ce 100644 + --- object-file.c + +++ object-file.c +@@ object-file.c: static void hash_object_body(const struct git_hash_algo *algo, struct git_hash_c + git_hash_final_oid(oid, c); + } + +-<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) + void write_object_file_prepare(const struct git_hash_algo *algo, + const void *buf, size_t len, + enum object_type type, struct object_id *oid, + char *hdr, size_t *hdrlen) +-======= +-static void write_object_file_prepare(const struct git_hash_algo *algo, +- const void *buf, size_t len, +- enum object_type type, struct object_id *oid, +- char *hdr, size_t *hdrlen) +->>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + { + struct git_hash_ctx c; + +@@ object-file.c: int odb_source_loose_write_stream(struct odb_source_loose *loose, + return err; + } + +-<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) +-======= +-int odb_source_loose_write_object(struct odb_source *source, +- const void *buf, size_t len, +- enum object_type type, struct object_id *oid, +- struct object_id *compat_oid_in, +- enum odb_write_object_flags flags) +-{ +- const struct git_hash_algo *algo = source->odb->repo->hash_algo; +- const struct git_hash_algo *compat = source->odb->repo->compat_hash_algo; +- struct object_id compat_oid; +- char hdr[MAX_HEADER_LEN]; +- size_t hdrlen = sizeof(hdr); +- +- /* Generate compat_oid */ +- if (compat) { +- if (compat_oid_in) +- oidcpy(&compat_oid, compat_oid_in); +- else if (type == OBJ_BLOB) +- hash_object_file(compat, buf, len, type, &compat_oid); +- else { +- struct strbuf converted = STRBUF_INIT; +- convert_object_file(source->odb->repo, &converted, algo, compat, +- buf, len, type, 0); +- hash_object_file(compat, converted.buf, converted.len, +- type, &compat_oid); +- strbuf_release(&converted); +- } +- } +- +- /* Normally if we have it in the pack then we do not bother writing +- * it out into .git/objects/??/?{38} file. +- */ +- write_object_file_prepare(algo, buf, len, type, oid, hdr, &hdrlen); +- if (odb_freshen_object(source->odb, oid)) +- return 0; +- if (write_loose_object(source, oid, hdr, hdrlen, buf, len, 0, flags)) +- return -1; +- if (compat) +- return repo_add_loose_object_map(source, oid, &compat_oid); +- return 0; +-} +- +->>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + int force_object_loose(struct odb_source *source, + const struct object_id *oid, time_t mtime) + { + + ## object-file.h ## + remerge CONFLICT (content): Merge conflict in object-file.h + index ca175bf98c..2b361a2fe1 100644 + --- object-file.h + +++ object-file.h +@@ object-file.h: struct odb_source; + * `force_object_loose()` generic and is thus postponed to a later point in + * time. + */ +-<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) + int odb_source_loose_write_stream(struct odb_source_loose *source, +-======= +-int odb_source_loose_has_object(struct odb_source *source, +- const struct object_id *oid); +- +-int odb_source_loose_freshen_object(struct odb_source *source, +- const struct object_id *oid); +- +-int odb_source_loose_write_object(struct odb_source *source, +- const void *buf, size_t len, +- enum object_type type, struct object_id *oid, +- struct object_id *compat_oid_in, +- enum odb_write_object_flags flags); +- +-int odb_source_loose_write_stream(struct odb_source *source, +->>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + struct odb_write_stream *stream, size_t len, + struct object_id *oid); + + + ## sideband.c ## + remerge CONFLICT (content): Merge conflict in sideband.c + index 4530403a58..58a9378937 100644 + --- sideband.c + +++ sideband.c +@@ sideband.c: static struct keyword_entry keywords[] = { + }; + + static enum { +-<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) + ALLOW_CONTROL_SEQUENCES_UNSET = -1, + ALLOW_NO_CONTROL_CHARACTERS = 0, + ALLOW_ANSI_COLOR_SEQUENCES = 1<<0, +@@ sideband.c: void sideband_apply_url_config(const char *url) + string_list_clear(&config.vars, 1); + urlmatch_config_release(&config); + } +-======= +- ALLOW_NO_CONTROL_CHARACTERS = 0, +- ALLOW_ALL_CONTROL_CHARACTERS = 1, +- ALLOW_ANSI_COLOR_SEQUENCES = 2 +-} allow_control_characters = ALLOW_ANSI_COLOR_SEQUENCES; +->>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + + /* Returns a color setting (GIT_COLOR_NEVER, etc). */ + static enum git_colorbool use_sideband_colors(void) +@@ sideband.c: static enum git_colorbool use_sideband_colors(void) + if (use_sideband_colors_cached != GIT_COLOR_UNKNOWN) + return use_sideband_colors_cached; + +-<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) + if (allow_control_characters == ALLOW_CONTROL_SEQUENCES_UNSET) { + if (!repo_config_get_value(the_repository, "sideband.allowcontrolcharacters", &value)) + sideband_allow_control_characters_config("sideband.allowcontrolcharacters", value); + + if (allow_control_characters == ALLOW_CONTROL_SEQUENCES_UNSET) + allow_control_characters = ALLOW_DEFAULT_ANSI_SEQUENCES; +-======= +- switch (repo_config_get_maybe_bool(the_repository, "sideband.allowcontrolcharacters", &i)) { +- case 0: /* Boolean value */ +- allow_control_characters = i ? ALLOW_ALL_CONTROL_CHARACTERS : +- ALLOW_NO_CONTROL_CHARACTERS; +- break; +- case -1: /* non-Boolean value */ +- if (repo_config_get_string_tmp(the_repository, "sideband.allowcontrolcharacters", +- &value)) +- ; /* huh? `get_maybe_bool()` returned -1 */ +- else if (!strcmp(value, "color")) +- allow_control_characters = ALLOW_ANSI_COLOR_SEQUENCES; +- else +- warning(_("unrecognized value for `sideband." +- "allowControlCharacters`: '%s'"), value); +- break; +- default: +- break; /* not configured */ +->>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + } + + if (!repo_config_get_string_tmp(the_repository, key, &value)) +@@ sideband.c: void list_config_color_sideband_slots(struct string_list *list, const char *pref + list_config_item(list, prefix, keywords[i].keyword); + } + +-<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) + static int handle_ansi_sequence(struct strbuf *dest, const char *src, int n) +-======= +-static int handle_ansi_color_sequence(struct strbuf *dest, const char *src, int n) +->>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + { + int i; + +@@ sideband.c: static int handle_ansi_color_sequence(struct strbuf *dest, const char *src, int + * Valid ANSI color sequences are of the form + * + * ESC [ [<n> [; <n>]*] m +-<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) + * + * These are part of the Select Graphic Rendition sequences which + * contain more than just color sequences, for more details see +@@ sideband.c: static int handle_ansi_color_sequence(struct strbuf *dest, const char *src, int + strchr("ABCDEFGHf", src[i])) || + ((allow_control_characters & ALLOW_ANSI_ERASE) && + strchr("JKMPX", src[i]))) { +-======= +- */ +- +- if (allow_control_characters != ALLOW_ANSI_COLOR_SEQUENCES || +- n < 3 || src[0] != '\x1b' || src[1] != '[') +- return 0; +- +- for (i = 2; i < n; i++) { +- if (src[i] == 'm') { +->>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + strbuf_add(dest, src, i + 1); + return i; + } +@@ sideband.c: static void strbuf_add_sanitized(struct strbuf *dest, const char *src, int n) + { + int i; + +-<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) + if ((allow_control_characters & ALLOW_ALL_CONTROL_CHARACTERS)) { +-======= +- if (allow_control_characters == ALLOW_ALL_CONTROL_CHARACTERS) { +->>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + strbuf_add(dest, src, n); + return; + } + + strbuf_grow(dest, n); + for (; n && *src; src++, n--) { +-<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) + if (!iscntrl(*src) || *src == '\t' || *src == '\n') { + strbuf_addch(dest, *src); + } else if (allow_control_characters != ALLOW_NO_CONTROL_CHARACTERS && + (i = handle_ansi_sequence(dest, src, n))) { +-======= +- if (!iscntrl(*src) || *src == '\t' || *src == '\n') +- strbuf_addch(dest, *src); +- else if ((i = handle_ansi_color_sequence(dest, src, n))) { +->>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + src += i; + n -= i; + } else { + strbuf_addch(dest, '^'); +-<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) + strbuf_addch(dest, *src == 0x7f ? '?' : 0x40 + *src); +-======= +- strbuf_addch(dest, 0x40 + *src); +->>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + } + } + } + + ## t/meson.build ## + remerge CONFLICT (content): Merge conflict in t/meson.build + index 8c202e4d77..2bcdc945db 100644 + --- t/meson.build + +++ t/meson.build +@@ t/meson.build: clar_test_suites = [ + 'unit-tests/u-list-objects-filter-options.c', + 'unit-tests/u-mem-pool.c', + 'unit-tests/u-mingw.c', +-<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) + 'unit-tests/u-odb-inmemory.c', +-======= +->>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + 'unit-tests/u-oid-array.c', + 'unit-tests/u-oidmap.c', + 'unit-tests/u-oidtree.c', + + ## t/t5409-colorize-remote-messages.sh ## + remerge CONFLICT (content): Merge conflict in t/t5409-colorize-remote-messages.sh + index 283f066f33..07cbc62736 100755 + --- t/t5409-colorize-remote-messages.sh + +++ t/t5409-colorize-remote-messages.sh +@@ t/t5409-colorize-remote-messages.sh: test_expect_success 'fallback to color.ui' ' + grep "<BOLD;RED>error<RESET>: error" decoded + ' + +-<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) + if test_have_prereq WITH_BREAKING_CHANGES + then + TURN_ON_SANITIZING=already.turned=on +@@ t/t5409-colorize-remote-messages.sh: else + TURN_ON_SANITIZING=sideband.allowControlCharacters=color + fi + +-================================ +->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + test_expect_success 'disallow (color) control sequences in sideband' ' + write_script .git/color-me-surprised <<-\EOF && + printf "error: Have you \\033[31mread\\033[m this?\\a\\n" >&2 + exec "$@" + EOF +-<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) + test_config_global uploadPack.packObjectsHook ./color-me-surprised && + test_commit need-at-least-one-commit && + + git -c $TURN_ON_SANITIZING clone --no-local . throw-away 2>stderr && +-================================ +- test_config_global uploadPack.packObjectshook ./color-me-surprised && +- test_commit need-at-least-one-commit && +- +- git clone --no-local . throw-away 2>stderr && +->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + test_decode_color <stderr >decoded && + test_grep RED decoded && + test_grep "\\^G" stderr && +@@ t/t5409-colorize-remote-messages.sh: test_expect_success 'disallow (color) control sequences in sideband' ' + test_file_not_empty actual + ' + +-<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) + test_decode_csi() { + awk '{ + while (match($0, /\033/) != 0) { +@@ t/t5409-colorize-remote-messages.sh: test_expect_success 'allow all control sequences for a specific URL' ' + test_grep ! "\\^\\[\\[K" decoded + ' + +-================================ +->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + test_done + + ## t/t5563-simple-http-auth.sh ## + remerge CONFLICT (content): Merge conflict in t/t5563-simple-http-auth.sh + index 0fd9c64b40..5ef770c4fc 100755 + --- t/t5563-simple-http-auth.sh + +++ t/t5563-simple-http-auth.sh +@@ t/t5563-simple-http-auth.sh: test_expect_success 'access using three-legged auth' ' + EOF + ' + +-<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) +-================================ +-test_lazy_prereq NTLM 'curl --version | grep -q NTLM' +- +-test_expect_success NTLM 'access using NTLM auth' ' +- test_when_finished "per_test_cleanup" && +- +- set_credential_reply get <<-EOF && +- username=user +- password=pwd +- EOF +- +- test_config_global credential.helper test-helper && +- test_must_fail env GIT_TRACE_CURL=1 git \ +- ls-remote "$HTTPD_URL/ntlm_auth/repo.git" 2>err && +- test_grep "allowNTLMAuth" err && +- +- # Can be enabled via config +- GIT_TRACE_CURL=1 git -c http.$HTTPD_URL.allowNTLMAuth=true \ +- ls-remote "$HTTPD_URL/ntlm_auth/repo.git" && +- +- # Or via credential helper responding with ntlm=allow +- set_credential_reply get <<-EOF && +- username=user +- password=pwd +- ntlm=allow +- EOF +- +- git ls-remote "$HTTPD_URL/ntlm_auth/repo.git" +-' +- +->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + test_lazy_prereq SPNEGO 'curl --version | grep -qi "SPNEGO\|GSS-API\|Kerberos\|negotiate"' + + test_expect_success SPNEGO 'http.emptyAuth=auto attempts Negotiate before credential_fill' ' +@@ t/t5563-simple-http-auth.sh: test_expect_success SPNEGO 'http.emptyAuth=false skips Negotiate' ' + test_line_count = 1 actual_401s + ' + +-<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) + test_lazy_prereq NTLM 'curl --version | grep -q NTLM' + + test_expect_success NTLM 'access using NTLM auth' ' +@@ t/t5563-simple-http-auth.sh: test_expect_success NTLM 'access using NTLM auth' ' + git ls-remote "$HTTPD_URL/ntlm_auth/repo.git" + ' + +-================================ +->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + test_done + + ## t/t9200-git-cvsexportcommit.sh ## + remerge CONFLICT (content): Merge conflict in t/t9200-git-cvsexportcommit.sh + index b7e1f285f1..e2a86d7a90 100755 + --- t/t9200-git-cvsexportcommit.sh + +++ t/t9200-git-cvsexportcommit.sh +@@ t/t9200-git-cvsexportcommit.sh: case "$PWD" in + ;; + esac + +-<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) + if ! cvs version >/dev/null 2>&1 +-================================ +-cvs >/dev/null 2>&1 +-if test $? -ne 1 +->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + then + skip_all='skipping git cvsexportcommit tests, cvs not found' + test_done + + ## t/test-lib.sh ## + remerge CONFLICT (content): Merge conflict in t/test-lib.sh + index a9e7137404..30a1681884 100644 + --- t/test-lib.sh + +++ t/test-lib.sh +@@ + # You should have received a copy of the GNU General Public License + # along with this program. If not, see https://www.gnu.org/licenses/ . + +-<<<<<<< 33bae605a0 (??? t5563: add tests for http.emptyAuth with Negotiate) + # Enable the use of errexit so that any unexpected failures will cause us to + # abort tests, even when outside of a specific test case. + # +@@ t/test-lib.sh: case "${GIT_TEST_USE_SET_E:-false}" in + ;; + esac + +-======= +->>>>>>> 35e8b3a205 (AGENTS.md: document `amend!`, fixup-only PRs, and direct GfW PRs) + # On Unix/Linux, the path separator is the colon, on other systems it + # may be different, though. On Windows, for example, it is a semicolon. + # If the PATH variable contains semicolons, it is pretty safe to assumeTo: 88de53bb74 (AGENTS.md: document
amend!, fixup-only PRs, and direct GfW PRs (git-for-windows#6232), 2026-05-26) (6c60a2ebe0..88de53bb74)Statistics
Range-diff (click to expand)
^$false match at end of filegit addissue with NTFS junctions.git/branches/in the templatescontrib/subtreetesttargetstrbuf_realpath()parse_interpreter()contrib/subtreetests in CI buildsgit-<command>for built-insCC = gcc--pic-executableETC_*for MSYS2 environmentsgit.exeto be used instead of the "Git wrapper"windows.appendAtomicallywindows.appendAtomicallyin more caseslocaltime_r()is declared even in i686 buildserrnois set correctly when socket operations failgit add <file>where <file> traverses an NTFS junction git#2504 from dscho/access-repo-via-junctionparse_interpreter()git#3165 from dscho/increase-allowed-length-of-interpreter-pathcontrib/subtreetest execution to CI builds git#3349 from vdye/feature/ci-subtree-testsunsigned long->size_tconversion to support large files on Windows git#3533 from PhilipOakley/hashliteral_tsafe.directorygit#3791: Various fixes aroundsafe.directorygit-<command>s for built-ins (Skip linking the "dashed"git-<command>s for built-ins git#4252)mingw-w64-git(i.e. regular MSYS2 ecosystem) support (Add fullmingw-w64-git(i.e. regular MSYS2 ecosystem) support git#5971)C:\Program Files\Git\mingw64\bin\git.exegit#2506 from dscho/issue-2283remove_dir_recurse()(Don't traverse mount points inremove_dir_recurse()git#6151)git p4testsgit p4tests (ci(macos): skip thegit p4tests git#5954)core.longPathsif paths are too long to removegit_terminal_promptwith more terminalssymlinkattributeiconviconvis unavailable, usetest-helper --iconvbuiltin pwd -Wwhen availableamend!, fixup-only PRs, and direct GfW PRs (AGENTS.md: documentamend!, fixup-only PRs, and direct GfW PRs git#6232)