Skip to content

Rebase shears/next (#23674831772)#72

Open
gitforwindowshelper[bot] wants to merge 280 commits intobase/shears/next-23674831772from
shears/next-23674831772
Open

Rebase shears/next (#23674831772)#72
gitforwindowshelper[bot] wants to merge 280 commits intobase/shears/next-23674831772from
shears/next-23674831772

Conversation

@gitforwindowshelper
Copy link
Copy Markdown

Workflow run

Rebase Summary: next

From: 659f9143cf (mingw: use strftime() directly in UCRT builds (git-for-windows#6130), 2026-03-25) (48b126f9e6..659f9143cf)

Resolved: 97c2131 (Merge branch 'disallow-ntlm-auth-by-default', 2026-02-12)

kept both sides: retry env vars + http_auth_methods assignment in http.c; both install_script lines in lib-httpd.sh

Range-diff

Resolved: 659f914 (mingw: use strftime() directly in UCRT builds (git-for-windows#6130), 2026-03-25)

resolved all 8 conflicts by checking out HEAD's version, which matches REBASE_HEAD's tree (merge kept upstream's content for all conflicting files)

Range-diff

To: c0dc92272c (mingw: use strftime() directly in UCRT builds (git-for-windows#6130), 2026-03-25) (cbe40fb59c..c0dc92272c)

Statistics

Metric Count
Total conflicts 2
Skipped (upstreamed) 0
Resolved surgically 2
Range-diff (click to expand)
  1:  9c61a5f5db =   1:  f62e955a55 unix-socket: avoid leak when initialization fails
  2:  b95cfbc1d5 =   2:  2564b8f610 grep: prevent `^$` false match at end of file
  6:  00ddc6c07e =   3:  9fc4619dd8 vcpkg_install: detect lack of Git
  7:  0bcd07d2ee =   4:  8824146606 vcpkg_install: add comment regarding slow network connections
  8:  7191a3b355 =   5:  cdea2ef2cf vcbuild: install ARM64 dependencies when building ARM64 binaries
  9:  643faed389 =   6:  ac24cabdf4 vcbuild: add an option to install individual 'features'
 10:  e2c0e34f87 =   7:  9ee7a1ff20 cmake: allow building for Windows/ARM64
 11:  721f593663 =   8:  9baa54ecb8 mingw: include the Python parts in the build
 12:  1e827b0261 =   9:  90e3d96332 ci(vs-build) also build Windows/ARM64 artifacts
 13:  0ec958df5f =  10:  3dfe06c5ea win32/pthread: avoid name clashes with winpthread
 14:  fded766fcd =  11:  c2ed7076c6 Add schannel to curl installation
 15:  7fee332163 =  12:  3b14ceeacc hash-object: demonstrate a >4GB/LLP64 problem
 16:  7ae84cd8e0 =  13:  03a76e1188 git-compat-util: avoid redeclaring _DEFAULT_SOURCE
 17:  e8781fc13f =  14:  3591203c8b cmake(): allow setting HOST_CPU for cross-compilation
 18:  b2874e4a5b =  15:  26afe10614 object-file.c: use size_t for header lengths
 19:  b23d942540 =  16:  98f8c5d485 Import the source code of mimalloc v2.2.7
  3:  03463a80f5 =  17:  2e35085a23 t9350: point out that refs are not updated correctly
 20:  c008909407 =  18:  cd068f5143 CMake: default Visual Studio generator has changed
 21:  5299116e1c =  19:  97ec9ee859 hash algorithms: use size_t for section lengths
 22:  83c58f0c4d =  20:  e54987d9f4 mimalloc: adjust for building inside Git
  4:  38afef2ef3 =  21:  740253fe28 transport-helper: add trailing --
 23:  8c52d30ced =  22:  ebc5ae0af4 mingw: demonstrate a `git add` issue with NTFS junctions
 24:  f8ce688692 =  23:  ff055f8202 .gitignore: add Visual Studio CMakeSetting.json file
 25:  e50f779cbc =  24:  7098310434 hash-object --stdin: verify that it works with >4GB/LLP64
 26:  8cfc1cd6fd =  25:  f1f477b3fb mimalloc: offer a build-time option to enable it
 27:  c404c0ad74 =  26:  dbfb6365b3 t5505/t5516: allow running without `.git/branches/` in the templates
  5:  e6755425e7 =  27:  463ab2a311 remote-helper: check helper status after import/export
 28:  5018fabdb6 =  28:  897deab529 clean: do not traverse mount points
 29:  14c65914a6 =  29:  1f8964b1ba strbuf_realpath(): use platform-dependent API if available
 30:  0b4639ff1a =  30:  3899af3f17 http: use new "best effort" strategy for Secure Channel revoke checking
 31:  3af1ffe4ff =  31:  47479810ab subtree: update `contrib/subtree` `test` target
 32:  87469435dd =  32:  b888c44a98 CMakeLists: add default "x64-windows" arch for Visual Studio
 33:  a4293dfb62 =  33:  badbeca429 hash-object: add another >4GB/LLP64 test case
 35:  13b57b84c7 =  34:  516b806720 mingw: use mimalloc
 36:  0557a86448 =  35:  5ae9ec80f5 t5505/t5516: fix white-space around redirectors
 37:  1e172ba92b =  36:  fcd38442e8 Always auto-gc after calling a fast-import transport
 38:  d56aeb7623 =  37:  c5aca51b2f mingw: prevent regressions with "drive-less" absolute paths
 39:  5c5b5af008 =  38:  3c04aa668c clean: remove mount points when possible
 40:  4a70af715e =  39:  84f4985076 transport: optionally disable side-band-64k
 41:  5d06af7d3a =  40:  afabeb41f7 mingw: fix fatal error working on mapped network drives on Windows
 42:  ce1ce3a069 =  41:  0b9da69d52 clink.pl: fix MSVC compile script to handle libcurl-d.lib
 43:  4b2c8b681a =  42:  ca1e5fdb7f mingw: implement a platform-specific `strbuf_realpath()`
 44:  1994573784 =  43:  fd9de5fbe4 t3701: verify that we can add *lots* of files interactively
 45:  8c25a3d154 =  44:  1e0c0a35ff commit: accept "scissors" with CR/LF line endings
 46:  10c9bcc9a3 =  45:  6b079a33aa t0014: fix indentation
 47:  be9e06bc48 =  46:  99a4310bf8 git-gui: accommodate for intent-to-add files
 48:  d697610582 =  47:  61434f3dfc mingw: allow for longer paths in `parse_interpreter()`
 49:  33c3c58012 =  48:  1cc74fae14 compat/vcbuild: document preferred way to build in Visual Studio
 50:  ab097a26a1 =  49:  882a898cd6 http: optionally send SSL client certificate
 51:  a5ec021510 =  50:  c43dc020f5 ci: run `contrib/subtree` tests in CI builds
 52:  882e2c0ba3 =  51:  171a34fec5 CMake: show Win32 and Generator_platform build-option values
 53:  61b6cb0ea4 =  52:  cf47332a71 hash-object: add a >4GB/LLP64 test case using filtered input
 57:  f68cf8efe3 =  53:  0bb3530eb8 windows: skip linking `git-<command>` for built-ins
 58:  fe5b743e73 =  54:  d7983f4072 mingw: stop hard-coding `CC = gcc`
 59:  68f63c4533 =  55:  650f765053 mingw: drop the -D_USE_32BIT_TIME_T option
 60:  4f6ff53764 =  56:  5431f29db2 mingw: only use -Wl,--large-address-aware for 32-bit builds
 61:  9e2e92971b =  57:  e053a56581 mingw: avoid over-specifying `--pic-executable`
 62:  084104d415 =  58:  24f2588861 mingw: set the prefix and HOST_CPU as per MSYS2's settings
 63:  7bc2da23c8 =  59:  c48f62df2e mingw: only enable the MSYS2-specific stuff when compiling in MSYS2
 64:  ade3960123 =  60:  e8f12e1b52 mingw: rely on MSYS2's metadata instead of hard-coding it
 65:  107c943da0 =  61:  b655ad8349 mingw: always define `ETC_*` for MSYS2 environments
 66:  9ccce3fa45 =  62:  e383dba134 max_tree_depth: lower it for clang builds in general on Windows
 67:  db67e41f76 =  63:  37ef219f35 mingw: ensure valid CTYPE
 68:  1bd956f90e =  64:  12b95b52d0 ci: work around a problem with HTTP/2 vs libcurl v8.10.0
 69:  ddf9a82c16 =  65:  d8b6575a26 mingw: allow `git.exe` to be used instead of the "Git wrapper"
 70:  c067dd816a =  66:  49dbacb6f8 revision: create mark_trees_uninteresting_dense()
 71:  aa6bf50e16 =  67:  dbb0ef3c63 mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory
 72:  7b3f8ea3e1 =  68:  bbec53f9e1 survey: stub in new experimental 'git-survey' command
 73:  b3c261fb7e =  69:  f60626bf0f survey: add command line opts to select references
 74:  809fed3246 =  70:  d58ccdf654 clink.pl: fix libexpatd.lib link error when using MSVC
 75:  f9c7ad0ae3 =  71:  fc7507aa18 survey: start pretty printing data in table form
 76:  d3d41a55c6 =  72:  cb2c999341 Makefile: clean up .ilk files when MSVC=1
 77:  3fbe8d1541 =  73:  35492011cd survey: add object count summary
 78:  1b22bf9f9c =  74:  f4cfd8a0af vcbuild: add support for compiling Windows resource files
 79:  8c91267b6f =  75:  fbdfbf47c4 survey: summarize total sizes by object type
 80:  cf1e69a156 =  76:  98c9066bb0 config.mak.uname: add git.rc to MSVC builds
 81:  83636ab113 =  77:  6b0fd22303 MinGW: link as terminal server aware
 82:  b9ef1a46a7 =  78:  f1da0be8ff survey: show progress during object walk
 84:  2457c40f22 =  79:  5e4d9c64dd clink.pl: ignore no-stack-protector arg on MSVC=1 builds
 85:  0c92fdf443 =  80:  8d48098909 http: optionally load libcurl lazily
 86:  9b3f5beed3 =  81:  35cab8c238 survey: add ability to track prioritized lists
 88:  f1ddd08a0d =  82:  8fb492227c clink.pl: move default linker options for MSVC=1 builds
 89:  f31a1b2498 =  83:  c5bfd42464 http: support lazy-loading libcurl also on Windows
 90:  30bf05c291 =  84:  bcd7bab1bc survey: add report of "largest" paths
 34:  73ea06958c =  85:  af4ee83504 setup: properly use "%(prefix)/" when in WSL
 92:  468cc0ed4f =  86:  f4a2e2d4d2 Add config option `windows.appendAtomically`
 93:  c9d230e2e6 =  87:  0e0bbc2009 cmake: install headless-git.
 94:  306c24b1a5 =  88:  b142003293 http: when loading libcurl lazily, allow for multiple SSL backends
 95:  3b47499590 =  89:  f6b21db75e survey: add --top=<N> option and config
 54:  4d7f855da2 =  90:  a4d27bbc83 compat/mingw.c: do not warn when failing to get owner
 55:  acc09e3ddd =  91:  92a873b5ee mingw: $env:TERM="xterm-256color" for newer OSes
 56:  3727b9cf99 =  92:  bd47b78895 winansi: check result and Buffer before using Name
 97:  000423c7b6 =  93:  efe558fcbf mingw: change core.fsyncObjectFiles = 1 by default
 98:  9fb8e1a1d7 =  94:  ee7921fef9 Fix Windows version resources
 99:  4cf9c887c6 =  95:  97657263e2 status: fix for old-style submodules with commondir
100:  8f2dd8d3da =  96:  8c0c68f2ca git.rc: include winuser.h
101:  d2f3f351e1 =  97:  515346de8f mingw: do load libcurl dynamically by default
102:  da2d78dccf =  98:  f50f70f216 Add a GitHub workflow to verify that Git/Scalar work in Nano Server
103:  e030a7c608 =  99:  cb3ee23452 mingw: suggest `windows.appendAtomically` in more cases
104:  75876ada38 = 100:  8a7aedcf19 win32: use native ANSI sequence processing, if possible
105:  8438b1a94d = 101:  09bc6945cd common-main.c: fflush stdout buffer upon exit
106:  f6c396d833 = 102:  94b6d350dc t5601/t7406(mingw): do run tests with symlink support
107:  dbf8f5eafd = 103:  bd0cd0a4a4 win32: ensure that `localtime_r()` is declared even in i686 builds
108:  227a9d7511 = 104:  528ba8e437 Fallback to AppData if XDG_CONFIG_HOME is unset
109:  d2c6fc177f = 105:  6cef1f7199 run-command: be helpful with Git LFS fails on Windows 7
110:  145480c612 = 106:  00e48db67a survey: clearly note the experimental nature in the output
 83:  61337b9c55 = 107:  5ebd9e8eaa mingw: make sure `errno` is set correctly when socket operations fail
 87:  ebeac71f08 = 108:  bc70aa9288 compat/mingw: handle WSA errors in strerror
 91:  f9529a31ec = 109:  e4bbedf38d compat/mingw: drop outdated comment
 96:  060610db09 = 110:  5feb8f3b31 t0301: actually test credential-cache on Windows
111:  33462e6259 = 111:  cf585fe137 credential-cache: handle ECONNREFUSED gracefully
112:  358a75fe77 = 112:  c49eff3416 reftable: do make sure to use custom allocators
113:  51a9bf6650 = 113:  25ee9300f4 check-whitespace: avoid alerts about upstream commits
114:  d845fb5d58 = 114:  bd275456c6 t/t5571-prep-push-hook.sh: Add test with writing to stderr
115:  7a8eb7e825 = 115:  7dcb0809c5 git-svn: mark it as unsupported by the Git for Windows project
116:  0868f7cc37 = 116:  c5836d049b ci(macos): skip the `git p4` tests
117:  ebd457b7d2 = 117:  2600025d13 git-gui--askyesno: fix funny text wrapping
166:  5d713aefe0 = 118:  fbed571f48 git-gui--askyesno (mingw): use Git for Windows' icon, if available
118:  573440ffe2 = 119:  2e47e384ba Win32: make FILETIME conversion functions public
119:  61b0d01727 = 120:  5e410560d5 Win32: dirent.c: Move opendir down
120:  9ab582b0f9 = 121:  83b5ec00c7 mingw: make the dirent implementation pluggable
121:  f5102a7ffa = 122:  bb86644c8c Win32: make the lstat implementation pluggable
122:  3abfabc686 = 123:  648e6ba752 mingw: add infrastructure for read-only file system level caches
123:  c31d1f09b4 = 124:  e769fa7b76 mingw: add a cache below mingw's lstat and dirent implementations
124:  81d49e7609 = 125:  45f54be80c fscache: load directories only once
125:  e337be1e57 = 126:  e0febf52b6 fscache: add key for GIT_TRACE_FSCACHE
126:  8b68cfe20c = 127:  2178f986d0 fscache: remember not-found directories
127:  edf3a2eeb4 = 128:  e5b083c2b9 fscache: add a test for the dir-not-found optimization
128:  0bfaf539a4 = 129:  218e634250 add: use preload-index and fscache for performance
129:  fe289d9f76 = 130:  c29fb588b3 dir.c: make add_excludes aware of fscache during status
130:  5503fe1a72 = 131:  09f0fa0714 fscache: make fscache_enabled() public
131:  5ef72cd105 = 132:  6764654f9b dir.c: regression fix for add_excludes with fscache
132:  ddcdb48117 = 133:  43a7ebe26c fetch-pack.c: enable fscache for stats under .git/objects
133:  44e79b6edc = 134:  7188eea1bc checkout.c: enable fscache for checkout again
134:  e577e2c25d = 135:  cecf496e08 Enable the filesystem cache (fscache) in refresh_index().
135:  17c02a32a5 = 136:  17575f3433 fscache: use FindFirstFileExW to avoid retrieving the short name
136:  6c7067b4cf = 137:  fcfd7777fd fscache: add GIT_TEST_FSCACHE support
137:  200c051061 = 138:  8f9f21a80a fscache: add fscache hit statistics
138:  52a17d0fc2 = 139:  3bc86ad44d unpack-trees: enable fscache for sparse-checkout
139:  49c29712e0 = 140:  f5f9e9d5f5 status: disable and free fscache at the end of the status command
140:  2abd127e8d = 141:  2b53023887 mem_pool: add GIT_TRACE_MEMPOOL support
141:  a9162892e6 = 142:  9431bd1b95 fscache: fscache takes an initial size
142:  91969ebb5a = 143:  6b428107ad fscache: update fscache to be thread specific instead of global
143:  5644316881 = 144:  50381a5bb4 fscache: teach fscache to use mempool
144:  d938480b12 = 145:  9e1052a191 fscache: make fscache_enable() thread safe
145:  0cdc4822ce = 146:  597a698993 fscache: teach fscache to use NtQueryDirectoryFile
146:  3f5d3498d7 = 147:  e209e19d06 fscache: remember the reparse tag for each entry
147:  a7ffe3e978 = 148:  4c5f380bf1 fscache: implement an FSCache-aware is_mount_point()
148:  cb12339c7d = 149:  0c3b46ab43 clean: make use of FSCache
149:  7703385753 = 150:  088a32efc0 pack-objects (mingw): demonstrate a segmentation fault with large deltas
150:  7d4316aef6 = 151:  3990ef0289 mingw: support long paths
151:  854860055d = 152:  9b29a350d5 win32(long path support): leave drive-less absolute paths intact
152:  294fe9ef5b = 153:  ad90f5f7d5 compat/fsmonitor/fsm-*-win32: support long paths
153:  0a6376dbb1 = 154:  19865a53e8 clean: suggest using `core.longPaths` if paths are too long to remove
154:  8a76caa6a4 = 155:  bfd07798af mingw: Support `git_terminal_prompt` with more terminals
155:  0ab34837da = 156:  b6901a784e compat/terminal.c: only use the Windows console if bash 'read -r' fails
156:  94aa3352be = 157:  641d8f3c6a mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
157:  fd853eb946 = 158:  4291edb0bd Win32: symlink: move phantom symlink creation to a separate function
158:  ec4c5a211d = 159:  2d2bebbe2f Introduce helper to create symlinks that knows about index_state
159:  2d1101643b = 160:  2362810be5 mingw: allow to specify the symlink type in .gitattributes
161:  8c96b8b7cc = 161:  65d975ae69 Win32: symlink: add test for `symlink` attribute
163:  87becea013 = 162:  6a34daaf6a mingw: explicitly specify with which cmd to prefix the cmdline
165:  c3edfd3cd1 = 163:  f6d20a99d6 mingw: when path_lookup() failed, try BusyBox
160:  48a583a436 = 164:  9fe4e2c170 mingw: introduce code to detect whether we're inside a Windows container
168:  58bd004ca9 = 165:  c6be52b63f test-tool: learn to act as a drop-in replacement for `iconv`
162:  1431027b26 = 166:  f1909d59f8 mingw: when running in a Windows container, try to rename() harder
170:  e0e7125119 = 167:  17d428293f tests(mingw): if `iconv` is unavailable, use `test-helper --iconv`
164:  54a8ca7bc7 = 168:  2e73b9cbdf mingw: move the file_attr_to_st_mode() function definition
171:  776259387f = 169:  8cd3bbc891 gitattributes: mark .png files as binary
167:  99e3549d15 = 170:  18fe215715 mingw: Windows Docker volumes are *not* symbolic links
172:  1670fecc8d = 171:  c895c17857 tests: move test PNGs into t/lib-diff/
169:  815f2181cb = 172:  0618d3530d mingw: work around rename() failing on a read-only file
173:  d509fa3ead = 173:  9c95def7ae tests: only override sort & find if there are usable ones in /usr/bin/
174:  180134863e = 174:  b41fddd7f3 tests: use the correct path separator with BusyBox
175:  8ca6c3a5b3 = 175:  17588a3068 mingw: only use Bash-ism `builtin pwd -W` when available
176:  daf3278d52 = 176:  7e142a689a tests (mingw): remove Bash-specific pwd option
177:  7bb66b5651 = 177:  cb75004a2f test-lib: add BUSYBOX prerequisite
178:  7c956ddce6 = 178:  28549ca5e0 t5003: use binary file from t/lib-diff/
179:  8cd177d5b4 = 179:  0cd3978d69 t5532: workaround for BusyBox on Windows
180:  46e1de1663 = 180:  5794297975 t5605: special-case hardlink test for BusyBox-w32
182:  27beae32cb = 181:  ae7bff2cb8 t5813: allow for $PWD to be a Windows path
184:  443340cd21 = 182:  a3afd6e1f1 t9200: skip tests when $PWD contains a colon
181:  506e19e381 = 183:  b6db2f046c Describe Git for Windows' architecture [no ci]
186:  cb3aa65e7b = 184:  94e0f30deb mingw: kill child processes in a gentler way
187:  c6e78c4667 = 185:  98a076b5c4 mingw: optionally enable wsl compability file mode bits
183:  48b2a75666 = 186:  a50db1a270 Modify the Code of Conduct for Git for Windows
189:  1289c0b17a = 187:  d9d3da041b mingw: really handle SIGINT
185:  8bb16f892c = 188:  7d0ac1f262 CONTRIBUTING.md: add guide for first-time contributors
191:  275b3f9bc1 = 189:  15b9e6eb41 Partially un-revert "editor: save and reset terminal after calling EDITOR"
188:  5555082b81 = 190:  1c420d6a34 README.md: Add a Windows-specific preamble
194:  7f0889199a = 191:  1c204af001 reset: reinstate support for the deprecated --stdin option
190:  34c7eebdc7 = 192:  9ab147afbd Add an issue template
192:  5642b30ddc = 193:  836ffe213a Add a GitHub workflow to monitor component updates
195:  8448cb451d = 194:  c3e5c15995 fsmonitor: reintroduce core.useBuiltinFSMonitor
193:  adf84bc849 = 195:  9466c076dd Modify the GitHub Pull Request template (to reflect Git for Windows)
196:  87dbe4a7fc = 196:  dfc589eb1d dependabot: help keeping GitHub Actions versions up to date
197:  941cea907c = 197:  2018af6aad SECURITY.md: document Git for Windows' policies
198:  2e4fadda46 = 198:  c9ad3be69d http: fix bug in ntlm_allow=1 handling
199:  d03d743240 = 199:  1554e8cce0 fixup! git-svn: mark it as unsupported by the Git for Windows project

dscho and others added 30 commits March 28, 2026 01:56
Windows' equivalent to "bind mounts", NTFS junction points, can be
unlinked without affecting the mount target. This is clearly what users
expect to happen when they call `git clean -dfx` in a worktree that
contains NTFS junction points: the junction should be removed, and the
target directory of said junction should be left alone (unless it is
inside the worktree).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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>
These fixes have been sent to the Git mailing list but have not been
picked up by the Git project yet.

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>
dscho and others added 30 commits March 28, 2026 01:56
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>
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>
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>
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>
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>
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>
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>
…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>
Handle Ctrl+C in Git Bash nicely

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>
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>
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>
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>
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>
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>
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>
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>
…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>
In 816db62 (credential: advertise NTLM suppression and allow
helpers to re-enable, 2026-02-09), Git learned to advertise that NTLM
authentication was suppressed to credential helpers. It also introduced
a way to allow credential helpers to opt-back-in to NTLM authentication
via the `ntlm_allow=1` credential protocol flag.

There is a bug in the logic of 816db62 that means we are responding
to the `ntlm_allow=1` signal too late in the auth retry codepath; we've
already made the second-attempt request!

Move adding of NTLM as a valid auth method to `http_request_reauth`
right after the credential helper is consulted following the first
request, but (now) before we made the second request.

Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
This topic branch addresses the following vulnerability:

- **CVE-2025-66413**:
  When a user clones a repository from an attacker-controlled server,
  Git may attempt NTLM authentication and disclose the user's NTLMv2 hash
  to the remote server. Since NTLM hashing is weak, the captured hash can
  potentially be brute-forced to recover the user's credentials. This is
  addressed by disabling NTLM authentication by default.
  (GHSA-hv9c-4jm9-jh3x)

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
As of git-for-windows/MINGW-packages#187, Git
for Windows no longer includes `git svn` in its installers and portable
Git editions.

As a consequence, the deprecation note is no longer necessary.

Even worse: Since the recommendation for users who want (or at least
need) to continue using `git svn` is to use the MSYS2 package instead,
and that MSYS2 package is built from Git for Windows' source code, they
would now be bothered by a note that they do not need.

So let's drop that deprecation note.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In 816db62 (credential: advertise NTLM suppression and allow helpers
to re-enable, 2026-02-09), Git learned to advertise that NTLM
authentication was suppressed to credential helpers. It also introduced
a way to allow credential helpers to opt-back-in to NTLM authentication
via the `ntlm_allow=1` credential protocol flag.

There is a bug in the logic of 816db62 that means we are responding
to the `ntlm_allow=1` signal too late in the auth retry codepath; we've
already made the second-attempt request!

Move adding of NTLM as a valid auth method to `http_request_reauth`
right after the credential helper is consulted following the first
request, but (now) before we made the second request.
… Git for Windows, anyway) (git-for-windows#6142)

As of git-for-windows/MINGW-packages#187, Git
for Windows no longer includes `git svn` in its installers and portable
Git editions.

As a consequence, the deprecation note is no longer necessary.

Even worse: Since the recommendation for users who want (or at least
need) to continue using `git svn` is to use the MSYS2 package instead,
and that MSYS2 package is built from Git for Windows' source code, they
would now be bothered by a note that they do not need.

So let's drop that deprecation note.
Currently, Git for Windows is built off of the MINGW64 tool chain. But
this will have to change because [the MSYS2 project deprecated this tool
chain in favor of
UCRT64](https://www.msys2.org/news/#2026-03-15-deprecating-the-mingw64-environment).
Of course, that's only possible because they dropped support for Windows
8.1, which Git for Windows will probably have to do relatively soon. The
best time to do that is probably [the Git 3.0 inflection
point](git-for-windows#6018) when we
already promised to drop support for older Windows versions.

To prepare for such a huge change, I investigated what needs to be
changed in Git for Windows' source code. And the good news is there's
actually not very much. This here patch seems to be the only change
that's necessary, and not even _strictly_ necessary: the
`mingw_strftime()` wrapper would still do the right thing. It would just
uselessly load the same function that's already loaded, dynamically,
again.

- The `strerror()` override [is guarded by an `#ifndef
_UCRT`](https://github.com/git-for-windows/git/blob/v2.53.0.windows.2/compat/mingw-posix.h#L294-L296),
- `PRIuMAX` resolves to standard `"llu"` [via
`<inttypes.h>`](https://github.com/git-for-windows/git/blob/v2.53.0.windows.2/compat/mingw-posix.h#L449-L454)
(note that `__MINGW64_VERSION_MAJOR` is defined both in MINGW64 and
UCRT64, by virtue of using the `mingw-w64-headers`),
-
[`__USE_MINGW_ANSI_STDIO=0`](https://github.com/git-for-windows/git/blob/v2.53.0.windows.2/config.mak.uname#L751C19-L751C33)
is irrelevant because [`_UCRT` short-circuits
it](https://github.com/git-for-windows/git-sdk-64/blob/08933e673c79b5db48419917a2b02746b390afc4/mingw64/include/inttypes.h#L33),
and
- `SNPRINTF_RETURNS_BOGUS` hasn't been set for Git for Windows' builds
since ec47a33, i.e. for a _really_ long
time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.