Skip to content

Rebase shears/main (#23573748360)#68

Open
gitforwindowshelper[bot] wants to merge 285 commits intobase/shears/main-23573748360from
shears/main-23573748360
Open

Rebase shears/main (#23573748360)#68
gitforwindowshelper[bot] wants to merge 285 commits intobase/shears/main-23573748360from
shears/main-23573748360

Conversation

@gitforwindowshelper
Copy link
Copy Markdown

Workflow run

Rebase Summary: main

From: fea4d6260d (mingw: use strftime() directly in UCRT builds (git-for-windows#6130), 2026-03-25) (213a85628d..fea4d6260d)

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

took HEAD's side in all three collateral merge conflicts (files not touched by the actual patch)

Range-diff

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

Statistics

Metric Count
Total conflicts 1
Skipped (upstreamed) 0
Resolved surgically 1
Range-diff (click to expand)
  1:  3ed2b25ef7 =   1:  3e96f00000 sideband: mask control characters
  2:  0076fe2f5f =   2:  f7405e05d8 sideband: introduce an "escape hatch" to allow control characters
  3:  ffa0772972 =   3:  8f5a4f8a16 sideband: do allow ANSI color sequences by default
  4:  abea8bea6f =   4:  f799c5749c unix-socket: avoid leak when initialization fails
  5:  09a1800dd5 =   5:  0390ed4e53 grep: prevent `^$` false match at end of file
  6:  7a129fee1f =   6:  24e0b09d35 vcpkg_install: detect lack of Git
  7:  4c535bebee =   7:  77eee02fa2 vcpkg_install: add comment regarding slow network connections
  8:  5f131a106e =   8:  9fc2c9d5bc vcbuild: install ARM64 dependencies when building ARM64 binaries
 11:  112e7e3ce8 =   9:  2ff32ac22c mingw: include the Python parts in the build
  9:  b33cc8f8f7 =  10:  9960446c34 vcbuild: add an option to install individual 'features'
 13:  37b8aef889 =  11:  c0ac2ddbf5 win32/pthread: avoid name clashes with winpthread
 10:  b808874cee =  12:  9d9c938294 cmake: allow building for Windows/ARM64
 15:  ada3dbea58 =  13:  0d8e6838b2 git-compat-util: avoid redeclaring _DEFAULT_SOURCE
 12:  85a494e18d =  14:  142a359fc6 ci(vs-build) also build Windows/ARM64 artifacts
 17:  b81d849fba =  15:  23dac2af10 Import the source code of mimalloc v2.2.7
 14:  1d7afee12d =  16:  02ddb0043b Add schannel to curl installation
 19:  d1a96a9278 =  17:  6a6f943a61 t9350: point out that refs are not updated correctly
 21:  c966e7cc1d =  18:  d1e0e6ed93 mimalloc: adjust for building inside Git
 16:  896a09ca86 =  19:  0d000cfd32 cmake(): allow setting HOST_CPU for cross-compilation
 23:  4b178bfb15 =  20:  2caff430eb transport-helper: add trailing --
 24:  a4d6676fc8 =  21:  69e1ef3fdc mingw: demonstrate a `git add` issue with NTFS junctions
 26:  71b642f5a3 =  22:  301503d1d3 mimalloc: offer a build-time option to enable it
 27:  5984803aa5 =  23:  ddba1f5952 t5505/t5516: allow running without `.git/branches/` in the templates
 20:  6dbd04406a =  24:  30083bb5e4 CMake: default Visual Studio generator has changed
 29:  7aca09e2b3 =  25:  9855ab1e53 remote-helper: check helper status after import/export
 30:  af0e4547ab =  26:  3e435817da clean: do not traverse mount points
 31:  03689f1ee5 =  27:  af3ea67b17 strbuf_realpath(): use platform-dependent API if available
 32:  dc7828c26b =  28:  917c83c4c4 http: use new "best effort" strategy for Secure Channel revoke checking
 33:  68add2c4a3 =  29:  df218d38fa subtree: update `contrib/subtree` `test` target
 35:  c46a685486 =  30:  c3d0731cb0 mingw: use mimalloc
 36:  66cfed1f1c =  31:  0064f79571 t5505/t5516: fix white-space around redirectors
 25:  494878e3a5 =  32:  247501d288 .gitignore: add Visual Studio CMakeSetting.json file
 38:  905cf6d9b9 =  33:  89c1d7a7db Always auto-gc after calling a fast-import transport
 39:  760cfc2c5e =  34:  896bb923b0 mingw: prevent regressions with "drive-less" absolute paths
 40:  15b73d74ef =  35:  cefe8bd862 clean: remove mount points when possible
 41:  e6e67b1a42 =  36:  42fd736484 transport: optionally disable side-band-64k
 42:  e1a745ed1c =  37:  444b9a5ab1 mingw: fix fatal error working on mapped network drives on Windows
 43:  c78f4e2bf4 =  38:  fc8da53add clink.pl: fix MSVC compile script to handle libcurl-d.lib
 44:  9484008545 =  39:  8e7d3995b2 mingw: implement a platform-specific `strbuf_realpath()`
 45:  25d37fc338 =  40:  c1b17bb32a t3701: verify that we can add *lots* of files interactively
 46:  e280d37fa1 =  41:  579e5d83af commit: accept "scissors" with CR/LF line endings
 47:  ccebbf256d =  42:  f944685ff4 t0014: fix indentation
 48:  0f2f473912 =  43:  c7e6d0eaad git-gui: accommodate for intent-to-add files
 49:  7ad2baddca =  44:  e901a02bed mingw: allow for longer paths in `parse_interpreter()`
 50:  2f1110809d =  45:  dc51f5dd6f compat/vcbuild: document preferred way to build in Visual Studio
 51:  f9446516c2 =  46:  cb8f67770d http: optionally send SSL client certificate
 52:  e74a831d81 =  47:  46a7428d5b ci: run `contrib/subtree` tests in CI builds
 54:  4eeba8934e =  48:  9b853e36c4 windows: skip linking `git-<command>` for built-ins
 55:  4d9c504289 =  49:  06a7505ce4 mingw: stop hard-coding `CC = gcc`
 56:  724e353977 =  50:  52e350294b mingw: drop the -D_USE_32BIT_TIME_T option
 57:  44b9f3127c =  51:  76378caa66 mingw: only use -Wl,--large-address-aware for 32-bit builds
 58:  2498ebe7af =  52:  d1af4de487 mingw: avoid over-specifying `--pic-executable`
 59:  e91241bbb3 =  53:  c4e4d1a3de mingw: set the prefix and HOST_CPU as per MSYS2's settings
 60:  d649ee8d89 =  54:  70b840752b mingw: only enable the MSYS2-specific stuff when compiling in MSYS2
 61:  bfde6a2e7c =  55:  83d367e0ad mingw: rely on MSYS2's metadata instead of hard-coding it
 62:  ad69b19d6f =  56:  5fc950d5ef mingw: always define `ETC_*` for MSYS2 environments
 63:  9c4e82c4db =  57:  88d7de85ea max_tree_depth: lower it for clang builds in general on Windows
 64:  924280ceb7 =  58:  f06ba678f0 mingw: ensure valid CTYPE
 65:  481bff9362 =  59:  3d24a5dc61 mingw: allow `git.exe` to be used instead of the "Git wrapper"
 66:  28bd792f4a =  60:  6774ac131f mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory
 67:  cf6423de68 =  61:  d6250faf84 clink.pl: fix libexpatd.lib link error when using MSVC
 68:  2194ea01be =  62:  bcd54bdc96 Makefile: clean up .ilk files when MSVC=1
 18:  07d9418948 =  63:  1b32cec13e hash-object: demonstrate a >4GB/LLP64 problem
 69:  5cea9d1831 =  64:  4ed0dcf5ab vcbuild: add support for compiling Windows resource files
 22:  af28ae8a71 =  65:  6f5e7aba3d object-file.c: use size_t for header lengths
 70:  a9326abdd9 =  66:  cc7018f33a config.mak.uname: add git.rc to MSVC builds
 71:  01fc5ccf5f =  67:  faad326c96 MinGW: link as terminal server aware
 28:  698eb9b858 =  68:  4f17428fde hash algorithms: use size_t for section lengths
 73:  531fdf557d =  69:  90c49ae25a clink.pl: ignore no-stack-protector arg on MSVC=1 builds
 74:  99de5c6843 =  70:  ddcb55944d http: optionally load libcurl lazily
 37:  7b32d3e767 =  71:  8ac134bfe6 hash-object --stdin: verify that it works with >4GB/LLP64
 76:  f0020d9a5a =  72:  bc61e45042 clink.pl: move default linker options for MSVC=1 builds
 77:  b8fa73da0d =  73:  7dd8a3ee3c http: support lazy-loading libcurl also on Windows
 34:  80aa776387 =  74:  c47882c211 CMakeLists: add default "x64-windows" arch for Visual Studio
 79:  ba24531cdb =  75:  d89c6b8e7f hash-object: add another >4GB/LLP64 test case
 80:  4182bab7ae =  76:  88b3eb3040 setup: properly use "%(prefix)/" when in WSL
 81:  c43e347f58 =  77:  b92b2cccc3 Add config option `windows.appendAtomically`
 82:  80782872da =  78:  eb2cd5d7ea cmake: install headless-git.
 83:  d81a9033ef =  79:  0375c48b8b http: when loading libcurl lazily, allow for multiple SSL backends
 53:  d77e0c8b58 =  80:  8c226c4831 CMake: show Win32 and Generator_platform build-option values
 85:  d236fec857 =  81:  8f512748b5 hash-object: add a >4GB/LLP64 test case using filtered input
 86:  37050eead4 =  82:  3bd7b80e59 compat/mingw.c: do not warn when failing to get owner
 87:  39136caea0 =  83:  33fd69b75d mingw: $env:TERM="xterm-256color" for newer OSes
 88:  4c8a56b0cd =  84:  7b47e0cc2e winansi: check result and Buffer before using Name
 89:  c0ca60b38b =  85:  ab2213246a mingw: change core.fsyncObjectFiles = 1 by default
 90:  84153c5d6b =  86:  254f7a11ad Fix Windows version resources
 91:  009a59c5ea =  87:  8a9244b614 status: fix for old-style submodules with commondir
 92:  567440409f =  88:  96e0af7f31 git.rc: include winuser.h
 93:  98a5176638 =  89:  3bb3145086 mingw: do load libcurl dynamically by default
 94:  6aa70696a8 =  90:  3c9d9717b2 Add a GitHub workflow to verify that Git/Scalar work in Nano Server
 95:  b0fe6ef1b6 =  91:  c58e5e69b6 mingw: suggest `windows.appendAtomically` in more cases
 96:  208161fb55 =  92:  c40ec298c8 win32: use native ANSI sequence processing, if possible
 97:  f4c7ec896c =  93:  008a1cf29a common-main.c: fflush stdout buffer upon exit
 98:  8119897bb8 =  94:  fe7e0a246d t5601/t7406(mingw): do run tests with symlink support
 99:  835dbf5ff3 =  95:  12cb618ad1 win32: ensure that `localtime_r()` is declared even in i686 builds
100:  85ec9126dc =  96:  6b6187ab92 Fallback to AppData if XDG_CONFIG_HOME is unset
101:  eeb1b1c633 =  97:  35ab4ba121 run-command: be helpful with Git LFS fails on Windows 7
 72:  0fbde9b9bb =  98:  56c383eab5 ci: work around a problem with HTTP/2 vs libcurl v8.10.0
 75:  2e2e72ce00 =  99:  aaabd48623 revision: create mark_trees_uninteresting_dense()
 78:  650ce6704d = 100:  ca3824b5c5 survey: stub in new experimental 'git-survey' command
 84:  0c58843510 = 101:  66bba8b583 survey: add command line opts to select references
102:  4071e89c6f = 102:  76a3016d08 survey: start pretty printing data in table form
103:  089bd9902d = 103:  2fd4c5e27d survey: add object count summary
104:  bd11bdaad9 = 104:  f953464c7b survey: summarize total sizes by object type
105:  b0fcd19a0f = 105:  a0049e09e1 survey: show progress during object walk
106:  4daaedfd20 = 106:  2bc67d04be mingw: make sure `errno` is set correctly when socket operations fail
107:  8670281cea = 107:  b24528236c survey: add ability to track prioritized lists
108:  6437ca5c0b = 108:  7ed9029856 compat/mingw: handle WSA errors in strerror
109:  ed7b13ba15 = 109:  06163a1fb7 survey: add report of "largest" paths
110:  0e4612d552 = 110:  5f4e75d4a4 compat/mingw: drop outdated comment
111:  ac64636f4e = 111:  3245fc7a57 survey: add --top=<N> option and config
112:  5d8f42972d = 112:  ea718df5e9 t0301: actually test credential-cache on Windows
113:  aaf5bd5c83 = 113:  a1452464fc survey: clearly note the experimental nature in the output
114:  4fe546d267 = 114:  befdc41b60 credential-cache: handle ECONNREFUSED gracefully
115:  d6d113f758 = 115:  c9a3e64b81 reftable: do make sure to use custom allocators
116:  975f537a81 = 116:  a8d7ab19df check-whitespace: avoid alerts about upstream commits
117:  3ac0c538a3 = 117:  2cd321a1d7 t/t5571-prep-push-hook.sh: Add test with writing to stderr
118:  cb3c7704a0 = 118:  be3c8a7644 git-svn: mark it as unsupported by the Git for Windows project
119:  65effba32d = 119:  1362f89f3a ci(macos): skip the `git p4` tests
120:  8c0bfb8ada = 120:  af1cf37fda Win32: make FILETIME conversion functions public
121:  32bf5b4f53 = 121:  2a0ae3fe34 Win32: dirent.c: Move opendir down
122:  3573b271cd = 122:  6ab9849cf9 mingw: make the dirent implementation pluggable
123:  88c1cecf0a = 123:  2aadc6e459 Win32: make the lstat implementation pluggable
124:  3ce7ca9faf = 124:  ef59f21b8e mingw: add infrastructure for read-only file system level caches
125:  b87de5022a = 125:  983f685b52 mingw: add a cache below mingw's lstat and dirent implementations
126:  0871a6bdec = 126:  ee89cd672d fscache: load directories only once
127:  d7864900cc = 127:  b8217aa048 fscache: add key for GIT_TRACE_FSCACHE
128:  a481e59c88 = 128:  96d640618d fscache: remember not-found directories
129:  807831268d = 129:  517a7bc1c4 fscache: add a test for the dir-not-found optimization
130:  d642424203 = 130:  286a591d0f add: use preload-index and fscache for performance
131:  0ed4a4117f = 131:  2821607636 dir.c: make add_excludes aware of fscache during status
132:  50bc91d8fa = 132:  e5054331ca fscache: make fscache_enabled() public
133:  5370c2666b = 133:  8254ef2dd0 dir.c: regression fix for add_excludes with fscache
134:  5a5719142d = 134:  cd52a5bd0b fetch-pack.c: enable fscache for stats under .git/objects
135:  81ceec9dfb = 135:  d2b3211048 checkout.c: enable fscache for checkout again
138:  234ba2701a = 136:  a31a0a982c git-gui--askyesno: fix funny text wrapping
136:  3be469f781 = 137:  7fae7517f3 Enable the filesystem cache (fscache) in refresh_index().
140:  2a6ece8d94 = 138:  31848afde7 git-gui--askyesno (mingw): use Git for Windows' icon, if available
137:  c618d4e9cd = 139:  6149eaaab0 fscache: use FindFirstFileExW to avoid retrieving the short name
139:  5fdf62b7ed = 140:  1238ec7826 fscache: add GIT_TEST_FSCACHE support
141:  bb3190d589 = 141:  3783c73ecd fscache: add fscache hit statistics
142:  14c400647c = 142:  736df48a56 unpack-trees: enable fscache for sparse-checkout
143:  604163345f = 143:  25d598974e status: disable and free fscache at the end of the status command
144:  4757355a60 = 144:  011646ba46 mem_pool: add GIT_TRACE_MEMPOOL support
145:  37aa6eab41 = 145:  dacec37633 fscache: fscache takes an initial size
146:  eb9e5ebb76 = 146:  146fc247ae fscache: update fscache to be thread specific instead of global
147:  cb43036bad = 147:  f1dd2a5195 fscache: teach fscache to use mempool
148:  b09ddd4bf9 = 148:  abb87dd468 fscache: make fscache_enable() thread safe
149:  25f5b0b674 = 149:  8a1d6281cf fscache: teach fscache to use NtQueryDirectoryFile
150:  a1a9b93187 = 150:  67059fd82f fscache: remember the reparse tag for each entry
151:  95edf06dbe = 151:  4ee3cdac90 fscache: implement an FSCache-aware is_mount_point()
152:  b9d322499c = 152:  c711b1ea4c clean: make use of FSCache
153:  2f160e3a49 = 153:  ee4f5f96e8 pack-objects (mingw): demonstrate a segmentation fault with large deltas
154:  cd3c060d75 = 154:  216d7248d3 mingw: support long paths
155:  8e80f5c833 = 155:  a7fae37cbb win32(long path support): leave drive-less absolute paths intact
156:  ec237c9a1f = 156:  c791c95e6f compat/fsmonitor/fsm-*-win32: support long paths
157:  c13d3a9d92 = 157:  f3ff816450 clean: suggest using `core.longPaths` if paths are too long to remove
158:  34dc1fde88 = 158:  d2f2746689 mingw: Support `git_terminal_prompt` with more terminals
159:  a8cfa10293 = 159:  6a43f58a0d compat/terminal.c: only use the Windows console if bash 'read -r' fails
160:  24502ae748 = 160:  6caa1741f0 mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
161:  ff3886ed7c = 161:  442d43e356 Win32: symlink: move phantom symlink creation to a separate function
162:  9ec93d96d7 = 162:  1b882b6575 Introduce helper to create symlinks that knows about index_state
163:  3bd8767138 = 163:  145747c1cf mingw: allow to specify the symlink type in .gitattributes
164:  ecabd30fcb = 164:  ccc97143c3 Win32: symlink: add test for `symlink` attribute
165:  488dce36b6 = 165:  fd28ee6ad3 mingw: explicitly specify with which cmd to prefix the cmdline
166:  96c4bdbe61 = 166:  972833e0b9 mingw: when path_lookup() failed, try BusyBox
167:  294f8e9df9 = 167:  6a08834dc2 test-tool: learn to act as a drop-in replacement for `iconv`
168:  e0f78ebf21 = 168:  c4ae03683b tests(mingw): if `iconv` is unavailable, use `test-helper --iconv`
169:  15e849af8d = 169:  5ad3083cbd gitattributes: mark .png files as binary
170:  022228deb8 = 170:  32ac9c70d4 tests: move test PNGs into t/lib-diff/
171:  e4a57594e9 = 171:  02c69ca0db tests: only override sort & find if there are usable ones in /usr/bin/
172:  e58e9eb39e = 172:  9e87f03804 tests: use the correct path separator with BusyBox
173:  f9ad039ca5 = 173:  4e6d5d3de9 mingw: only use Bash-ism `builtin pwd -W` when available
174:  0265f15b8b = 174:  e3dad72cc3 tests (mingw): remove Bash-specific pwd option
176:  07af96bdbe = 175:  af38ae920a mingw: introduce code to detect whether we're inside a Windows container
175:  0cc63e33dc = 176:  df62e1bf12 test-lib: add BUSYBOX prerequisite
178:  933bf382c8 = 177:  2034fa72ef mingw: when running in a Windows container, try to rename() harder
177:  f062fcc62e = 178:  a8144198bf t5003: use binary file from t/lib-diff/
180:  af5d525575 = 179:  1f36b2f854 mingw: move the file_attr_to_st_mode() function definition
179:  e921061a06 = 180:  7321bdcf43 t5532: workaround for BusyBox on Windows
182:  80a63c797f = 181:  eb7de6e2df mingw: Windows Docker volumes are *not* symbolic links
181:  957d210c84 = 182:  e38b187109 t5605: special-case hardlink test for BusyBox-w32
184:  625330d000 = 183:  f54de3264f mingw: work around rename() failing on a read-only file
183:  e914a62c4a = 184:  dac0caaf87 t5813: allow for $PWD to be a Windows path
185:  36f0da404e = 185:  e3315e831e t9200: skip tests when $PWD contains a colon
190:  7eacdf2d96 = 186:  be9f650076 Describe Git for Windows' architecture [no ci]
186:  6252405f1b = 187:  8b907bde0b mingw: kill child processes in a gentler way
187:  b64fb27850 = 188:  3174581d0d mingw: optionally enable wsl compability file mode bits
191:  e584f94068 = 189:  621c51f71c Modify the Code of Conduct for Git for Windows
188:  3db63d1064 = 190:  aa59e23fa7 mingw: really handle SIGINT
192:  2ff5f4f4ba = 191:  cab0081377 CONTRIBUTING.md: add guide for first-time contributors
189:  9eda10a7e3 = 192:  6423e94f3f Partially un-revert "editor: save and reset terminal after calling EDITOR"
193:  3065d93d4a = 193:  9363548e4b README.md: Add a Windows-specific preamble
195:  e6c598ada8 = 194:  f08dbe3011 reset: reinstate support for the deprecated --stdin option
196:  90d9f4a9f8 = 195:  744361cc98 Add an issue template
194:  d75fa2ff5b = 196:  98677c055d Add a GitHub workflow to monitor component updates
197:  14a0476f59 = 197:  dd6bea0fd7 fsmonitor: reintroduce core.useBuiltinFSMonitor
199:  39310b32bb = 198:  6e40213638 Modify the GitHub Pull Request template (to reflect Git for Windows)
198:  a9ba512aac = 199:  e696d5266d dependabot: help keeping GitHub Actions versions up to date
200:  9993c93d6e = 200:  ad0be1f810 SECURITY.md: document Git for Windows' policies
201:  ff74c967e3 = 201:  e8544eb207 osx-clang: work around Homebrew's clang lacking REG_ENHANCED
202:  a2d68e8823 = 202:  6091e940aa http: fix bug in ntlm_allow=1 handling
203:  4b429ca2bf = 203:  248eec5a4a fixup! git-svn: mark it as unsupported by the Git for Windows project

dscho and others added 30 commits March 26, 2026 02:14
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>
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>
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>
This is no longer true in general, not with supporting Clang out of the
box.

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>
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>
On LLP64 systems, such as Windows, the size of `long`, `int`, etc. is
only 32 bits (for backward compatibility). Git's use of `unsigned long`
for file memory sizes in many places, rather than size_t, limits the
handling of large files on LLP64 systems (commonly given as `>4GB`).

Provide a minimum test for handling a >4GB file. The `hash-object`
command, with the  `--literally` and without `-w` option avoids
writing the object, either loose or packed. This avoids the code paths
hitting the `bigFileThreshold` config test code, the zlib code, and the
pack code.

Subsequent patches will walk the test's call chain, converting types to
`size_t` (which is larger in LLP64 data models) where appropriate.

Signed-off-by: Philip Oakley <philipoakley@iee.email>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In bf2d5d8 (Don't let ld strip relocations, 2016-01-16) (picked from
git-for-windows@6a237925bf10),
Git for Windows introduced the `-Wl,-pic-executable` flag, specifying
the exact entry point via `-e`. This required discerning between i686
and x86_64 code because the former required the symbol to be prefixed
with an underscore, the latter did not.

As per https://sourceware.org/bugzilla/show_bug.cgi?id=10865, the
specified symbols are already the default, though.

So let's drop the overly-specific definition.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Continue walking the code path for the >4GB `hash-object --literally`
test. The `hash_object_file_literally()` function internally uses both
`hash_object_file()` and `write_object_file_prepare()`. Both function
signatures use `unsigned long` rather than `size_t` for the mem buffer
sizes. Use `size_t` instead, for LLP64 compatibility.

While at it, convert those function's object's header buffer length to
`size_t` for consistency. The value is already upcast to `uintmax_t` for
print format compatibility.

Note: The hash-object test still does not pass. A subsequent commit
continues to walk the call tree's lower level hash functions to identify
further fixes.

Signed-off-by: Philip Oakley <philipoakley@iee.email>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
MSYS2 already defines a couple of helpful environment variables, and we
can use those to infer the installation location as well as the CPU. No
need for hard-coding ;-)

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Create a wrapper for the Windows Resource Compiler (RC.EXE)
for use by the MSVC=1 builds. This is similar to the CL.EXE
and LIB.EXE wrappers used for the MSVC=1 builds.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Continue walking the code path for the >4GB `hash-object --literally`
test to the hash algorithm step for LLP64 systems.

This patch lets the SHA1DC code use `size_t`, making it compatible with
LLP64 data models (as used e.g. by Windows).

The interested reader of this patch will note that we adjust the
signature of the `git_SHA1DCUpdate()` function without updating _any_
call site. This certainly puzzled at least one reviewer already, so here
is an explanation:

This function is never called directly, but always via the macro
`platform_SHA1_Update`, which is usually called via the macro
`git_SHA1_Update`. However, we never call `git_SHA1_Update()` directly
in `struct git_hash_algo`. Instead, we call `git_hash_sha1_update()`,
which is defined thusly:

    static void git_hash_sha1_update(git_hash_ctx *ctx,
                                     const void *data, size_t len)
    {
        git_SHA1_Update(&ctx->sha1, data, len);
    }

i.e. it contains an implicit downcast from `size_t` to `unsigned long`
(before this here patch). With this patch, there is no downcast anymore.

With this patch, finally, the t1007-hash-object.sh "files over 4GB hash
literally" test case is fixed.

Signed-off-by: Philip Oakley <philipoakley@iee.email>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The tell-tale is the presence of the `MSYSTEM` value while compiling, of
course. In that case, we want to ensure that `MSYSTEM` is set when
running `git.exe`, and also enable the magic MSYS2 tty detection.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Teach MSVC=1 builds to depend on the `git.rc` file so that
the resulting executables have Windows-style resources and
version number information within them.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
This compile-time option allows to ask Git to load libcurl dynamically
at runtime.

Together with a follow-up patch that optionally overrides the file name
depending on the `http.sslBackend` setting, this kicks open the door for
installing multiple libcurl flavors side by side, and load the one
corresponding to the (runtime-)configured SSL/TLS backend.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Just like the `hash-object --literally` code path, the `--stdin` code
path also needs to use `size_t` instead of `unsigned long` to represent
memory sizes, otherwise it would cause problems on platforms using the
LLP64 data model (such as Windows).

To limit the scope of the test case, the object is explicitly not
written to the object store, nor are any filters applied.

The `big` file from the previous test case is reused to save setup time;
To avoid relying on that side effect, it is generated if it does not
exist (e.g. when running via `sh t1007-*.sh --long --run=1,41`).

Signed-off-by: Philip Oakley <philipoakley@iee.email>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho and others added 30 commits March 26, 2026 02:14
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>
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>
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>
The `osx-clang` and `osx-reftable` CI jobs on macOS started failing
with:

    compat/regcomp_enhanced.c:7:13: error: use of undeclared identifier
    'REG_ENHANCED'

The failure coincides with the GitHub Actions `macos-14-arm64` runner
image being updated from `20260302.0147` to `20260317.0174`.  The key
change in that image update is the Homebrew version bump from 5.0.15 to
5.1.0.

Homebrew 5.1.0 introduced automatic linking for versioned keg-only
formulae when the unversioned sibling is absent (see
Homebrew/brew#21676, announced at
https://brew.sh/2026/03/10/homebrew-5.1.0/).  The runner image installs
`llvm@15` (keg-only) but not unversioned `llvm`.  Under Homebrew 5.0.x
that formula stayed in its keg and its `clang` binary only lived at
`$(brew --prefix llvm@15)/bin/clang`.  Under 5.1.0, because unversioned
`llvm` is absent, `llvm@15` is now auto-linked into
`/opt/homebrew/bin/`, which sits earlier in PATH than `/usr/bin`.

The net effect is that `CC=clang` in CI now silently resolves to
Homebrew's LLVM 15.0.7 clang instead of Apple's system clang (Apple
clang 15.0.0, bundled with Xcode 15.4).  The runner image README
confirms this: the reported "Clang/LLVM" version flipped from 15.0.0 to
15.0.7 between image releases, matching the Homebrew LLVM version
exactly.

Homebrew's LLVM clang uses different include paths from Apple's clang.
In particular, the `regex.h` it sees does not define `REG_ENHANCED`,
which is an Apple-specific extension present in the macOS SDK headers
since at least macOS 10.12.  The Makefile unconditionally sets
`USE_ENHANCED_BASIC_REGULAR_EXPRESSIONS` for all Darwin builds via
`config.mak.uname`, which pulls in `compat/regcomp_enhanced.c`, which
references `REG_ENHANCED`, hence the build failure.

The `osx-gcc` job (CC=gcc-13) is unaffected because Homebrew GCC is
configured to use Apple's SDK sysroot, so it still picks up Apple's
`regex.h` which defines `REG_ENHANCED`.  The `osx-meson` job is
unaffected because Meson does a compile-time test for `REG_ENHANCED`
(via `compiler.get_define`) and simply skips the feature when it is
absent.

Work around this by setting `NO_REGEX` when `CC=clang` on Darwin, which
makes the build use Git's bundled regex implementation instead of the
system one.  This sidesteps the missing `REG_ENHANCED` define entirely.

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.