Skip to content

Rebase shears/seen (#23627444103)#69

Open
gitforwindowshelper[bot] wants to merge 280 commits intobase/shears/seen-23627444103from
shears/seen-23627444103
Open

Rebase shears/seen (#23627444103)#69
gitforwindowshelper[bot] wants to merge 280 commits intobase/shears/seen-23627444103from
shears/seen-23627444103

Conversation

@gitforwindowshelper
Copy link
Copy Markdown

Workflow run

Rebase Summary: seen

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

Resolved: aa6552d (t9200: skip tests when $PWD contains a colon, 2017-07-07)

added PWD colon check before upstream's simplified cvs invocation using $? instead of $status

Range-diff
1:  aa6552d8ac ! 1:  407b4baa10 t9200: skip tests when $PWD contains a colon
    @@ t/t9200-git-cvsexportcommit.sh: if ! test_have_prereq PERL; then
     +	;;
     +esac
     +
    - status=0; cvs >/dev/null 2>&1 || status=$?
    - if test $status -ne 1
    + cvs >/dev/null 2>&1
    + if test $? -ne 1
      then

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

kept both sides: retry env vars (HEAD) and NTLM auth disabling (security branch) in http.c; kept both install_script lines in t/lib-httpd.sh

Range-diff

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

resolved all 8 conflicts by taking HEAD (new upstream base) for files where only the upstream side changed between old and new base

Range-diff

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

Statistics

Metric Count
Total conflicts 3
Skipped (upstreamed) 0
Resolved surgically 3
Range-diff (click to expand)
  1:  0269c7de11 =   1:  a2278483fe unix-socket: avoid leak when initialization fails
  2:  ab7d669146 =   2:  b7ef25e61b grep: prevent `^$` false match at end of file
 17:  a8d10ff35b =   3:  8ea4c67e9c t9350: point out that refs are not updated correctly
  3:  b82296816a =   4:  8a61999944 vcpkg_install: detect lack of Git
  4:  1fdb9d9a5d =   5:  6c276e2e8b vcpkg_install: add comment regarding slow network connections
  5:  3db87e2263 =   6:  cb31662be7 vcbuild: install ARM64 dependencies when building ARM64 binaries
  6:  39eea99364 =   7:  24860e3380 vcbuild: add an option to install individual 'features'
  7:  7ba1ef7333 =   8:  68dfd591c3 cmake: allow building for Windows/ARM64
  8:  dcf5ef469b =   9:  8a045d57ad mingw: include the Python parts in the build
  9:  d3e2a71143 =  10:  95079bd1bb ci(vs-build) also build Windows/ARM64 artifacts
 10:  728970edae =  11:  d686164c4a win32/pthread: avoid name clashes with winpthread
 11:  868c07db9d =  12:  39e594a660 Add schannel to curl installation
 12:  81d2ddbf33 =  13:  24ce52204c hash-object: demonstrate a >4GB/LLP64 problem
 13:  6d2fc43c35 =  14:  41ed02e125 git-compat-util: avoid redeclaring _DEFAULT_SOURCE
 14:  11c9b5161c =  15:  3ce51dabf1 cmake(): allow setting HOST_CPU for cross-compilation
 15:  7ab2d3048a =  16:  d213e6f6ec object-file.c: use size_t for header lengths
 16:  3d394a3db7 =  17:  fccf24175f Import the source code of mimalloc v2.2.7
 18:  8808f61720 =  18:  b37de32dca CMake: default Visual Studio generator has changed
 19:  b156394245 =  19:  dc69c8c994 hash algorithms: use size_t for section lengths
 20:  4b4eb39cb3 =  20:  668afb96a7 mimalloc: adjust for building inside Git
 21:  827264fde2 =  21:  a1f44236fc transport-helper: add trailing --
 22:  ee18b13bb6 =  22:  f7d6fea16f mingw: demonstrate a `git add` issue with NTFS junctions
 23:  b959a4feca =  23:  e931927226 .gitignore: add Visual Studio CMakeSetting.json file
 24:  5689a80fca =  24:  a1b6f0a8bc hash-object --stdin: verify that it works with >4GB/LLP64
 25:  3468842144 =  25:  a3b5358d93 mimalloc: offer a build-time option to enable it
 26:  eb7a7efa69 =  26:  b31b5e75af t5505/t5516: allow running without `.git/branches/` in the templates
 27:  6fbc4618e6 =  27:  51a42df320 remote-helper: check helper status after import/export
 28:  e089178be4 =  28:  6e425ff66b clean: do not traverse mount points
 29:  65518f4af6 =  29:  ad3cdcc404 strbuf_realpath(): use platform-dependent API if available
 30:  b115b5ad31 =  30:  c566d5333e http: use new "best effort" strategy for Secure Channel revoke checking
 31:  ddf422a7c5 =  31:  209cfdc2f0 subtree: update `contrib/subtree` `test` target
 32:  159599daa1 =  32:  7e986b7edc CMakeLists: add default "x64-windows" arch for Visual Studio
 33:  df649c31ee =  33:  e60ff7fc18 hash-object: add another >4GB/LLP64 test case
 34:  e74f7e8731 =  34:  a1de16b39b mingw: use mimalloc
 35:  a5efeadddc =  35:  c8ecdb1bfc t5505/t5516: fix white-space around redirectors
 81:  d4569a8d71 =  36:  92052e942a setup: properly use "%(prefix)/" when in WSL
 36:  d5e3444958 =  37:  723106ac13 Always auto-gc after calling a fast-import transport
 37:  259db27612 =  38:  c699a3d679 mingw: prevent regressions with "drive-less" absolute paths
 38:  e2f0e26d28 =  39:  a9ae7aaba1 clean: remove mount points when possible
 39:  d2f7ad1fa6 =  40:  36f087edfd transport: optionally disable side-band-64k
 40:  6274ed9c93 =  41:  a4e11e9114 mingw: fix fatal error working on mapped network drives on Windows
 41:  bd779ecd85 =  42:  cfac29775d clink.pl: fix MSVC compile script to handle libcurl-d.lib
 42:  73c986a101 =  43:  d0ef58c17e mingw: implement a platform-specific `strbuf_realpath()`
 43:  c7534cb875 =  44:  3e8a799a61 t3701: verify that we can add *lots* of files interactively
 44:  c57b81bae2 =  45:  d37abf7fff commit: accept "scissors" with CR/LF line endings
 45:  6e8ed29b18 =  46:  11f654478b t0014: fix indentation
 46:  c375f8a970 =  47:  25269762bd git-gui: accommodate for intent-to-add files
 47:  3d8474eaaf =  48:  df95c68440 mingw: allow for longer paths in `parse_interpreter()`
 48:  64aa3ff803 =  49:  35d2effccf compat/vcbuild: document preferred way to build in Visual Studio
 49:  68e775a40f =  50:  97944b27d6 http: optionally send SSL client certificate
 50:  326b9a564f =  51:  907d15f741 ci: run `contrib/subtree` tests in CI builds
 51:  0aeca8ee53 =  52:  0e8146c45b CMake: show Win32 and Generator_platform build-option values
 52:  8e0c085f1e =  53:  83840526a8 hash-object: add a >4GB/LLP64 test case using filtered input
 53:  8174cf8aa7 =  54:  fc2c751d92 windows: skip linking `git-<command>` for built-ins
 54:  29263fec06 =  55:  d02b3af79a mingw: stop hard-coding `CC = gcc`
 55:  36e5c86e52 =  56:  225900a9a4 mingw: drop the -D_USE_32BIT_TIME_T option
 56:  3e07d68f78 =  57:  f2d5b384ce mingw: only use -Wl,--large-address-aware for 32-bit builds
 57:  f602c197ff =  58:  a262e4d8a9 mingw: avoid over-specifying `--pic-executable`
 58:  4a899c4f15 =  59:  da23c09aa7 mingw: set the prefix and HOST_CPU as per MSYS2's settings
 59:  fecce99628 =  60:  c21bbeed60 mingw: only enable the MSYS2-specific stuff when compiling in MSYS2
 60:  720012b7a7 =  61:  8cecaa74eb mingw: rely on MSYS2's metadata instead of hard-coding it
 61:  5184cda710 =  62:  9813cc3be5 mingw: always define `ETC_*` for MSYS2 environments
 62:  bb962583b0 =  63:  d2ed849140 max_tree_depth: lower it for clang builds in general on Windows
 63:  c2f2af55dd =  64:  b66b088e57 mingw: ensure valid CTYPE
 64:  2fd642589f =  65:  895e6dc5eb mingw: allow `git.exe` to be used instead of the "Git wrapper"
 65:  18b3d5f509 =  66:  355c74a898 mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory
 67:  dc6b52f378 =  67:  4ae193b1de ci: work around a problem with HTTP/2 vs libcurl v8.10.0
 69:  f8b8003c65 =  68:  26d8678be8 revision: create mark_trees_uninteresting_dense()
 66:  55ef2517c0 =  69:  3ef7aa5fe1 clink.pl: fix libexpatd.lib link error when using MSVC
 71:  ed8688a743 =  70:  9264de57e4 survey: stub in new experimental 'git-survey' command
 68:  e01bbb68b1 =  71:  31a6f0e438 Makefile: clean up .ilk files when MSVC=1
 74:  41e9ce6d2e =  72:  db0278d7c4 survey: add command line opts to select references
 70:  3c1aadd2b8 =  73:  574969ba2c vcbuild: add support for compiling Windows resource files
 77:  0ea1a56bcc =  74:  b0b4798e4f survey: start pretty printing data in table form
 72:  87c2e24e0e =  75:  f72b76a550 config.mak.uname: add git.rc to MSVC builds
 73:  e64882180e =  76:  ab8dff8a32 MinGW: link as terminal server aware
 80:  b17930fb0f =  77:  31fa9e2800 survey: add object count summary
 75:  a93bce128d =  78:  751222bd85 clink.pl: ignore no-stack-protector arg on MSVC=1 builds
 76:  542834ee18 =  79:  6645f1f982 http: optionally load libcurl lazily
 85:  9d95892413 =  80:  d6e4ebb870 survey: summarize total sizes by object type
 78:  8126c773f3 =  81:  e049948c9b clink.pl: move default linker options for MSVC=1 builds
 79:  5b77551584 =  82:  37a19e0b78 http: support lazy-loading libcurl also on Windows
102:  b35e5d2d49 =  83:  20be370050 survey: show progress during object walk
 82:  3dbed723db =  84:  242ca89262 Add config option `windows.appendAtomically`
 83:  2b299a3da8 =  85:  356e35a720 cmake: install headless-git.
 84:  8dcd7556f0 =  86:  9d5579cdb1 http: when loading libcurl lazily, allow for multiple SSL backends
104:  c1685048b2 =  87:  00c333e35f survey: add ability to track prioritized lists
 86:  3d77b4b901 =  88:  ed4188afa6 compat/mingw.c: do not warn when failing to get owner
 87:  8441c7b663 =  89:  c1624a39a3 mingw: $env:TERM="xterm-256color" for newer OSes
 88:  b52ef406b4 =  90:  9587fc0a93 winansi: check result and Buffer before using Name
 89:  0a723ae9be =  91:  45ae1b387a mingw: change core.fsyncObjectFiles = 1 by default
 90:  38ed0fd896 =  92:  d6687cdfb8 Fix Windows version resources
 91:  c3e2ad80ca =  93:  121145038a status: fix for old-style submodules with commondir
 92:  b6a289640b =  94:  ad030d847e git.rc: include winuser.h
 93:  350416dfe2 =  95:  aacf8f3514 mingw: do load libcurl dynamically by default
 94:  d25dfd3e5b =  96:  dc9cca085f Add a GitHub workflow to verify that Git/Scalar work in Nano Server
 95:  ed4daec12b =  97:  1b59d59851 mingw: suggest `windows.appendAtomically` in more cases
 96:  651f1c57b8 =  98:  179060fa3d win32: use native ANSI sequence processing, if possible
 97:  a20964ddde =  99:  d2c5eb83aa common-main.c: fflush stdout buffer upon exit
 98:  3302f10b45 = 100:  a3c5e2362c t5601/t7406(mingw): do run tests with symlink support
 99:  f57eb47ba6 = 101:  17aea3e734 win32: ensure that `localtime_r()` is declared even in i686 builds
100:  42ab689be0 = 102:  bae48db073 Fallback to AppData if XDG_CONFIG_HOME is unset
101:  94a12ce51e = 103:  1e9f15e753 run-command: be helpful with Git LFS fails on Windows 7
103:  60cbdb4c5c = 104:  27ccbe5b9e mingw: make sure `errno` is set correctly when socket operations fail
105:  c4c33a10ad = 105:  a4736e6fa3 compat/mingw: handle WSA errors in strerror
106:  2461587850 = 106:  a5dffcc370 survey: add report of "largest" paths
107:  ee68a478b5 = 107:  cfa11ca8ff compat/mingw: drop outdated comment
108:  45aefcb0bd = 108:  805667bfe1 survey: add --top=<N> option and config
109:  6813a5ffd0 = 109:  e0680710ef t0301: actually test credential-cache on Windows
110:  1630bc7789 = 110:  06ebf1ab45 survey: clearly note the experimental nature in the output
111:  266cde0031 = 111:  db8fc9253a credential-cache: handle ECONNREFUSED gracefully
112:  ab56e5f267 = 112:  10b68e7c6c reftable: do make sure to use custom allocators
113:  52cc859051 = 113:  70dffaf7ee check-whitespace: avoid alerts about upstream commits
114:  2073335228 = 114:  ddd3093311 t/t5571-prep-push-hook.sh: Add test with writing to stderr
115:  01a8f14496 = 115:  e1d0b83a3f git-svn: mark it as unsupported by the Git for Windows project
116:  9917e3f26a = 116:  abc7426b18 ci(macos): skip the `git p4` tests
117:  7bfc23aa5f = 117:  2c79c92583 Win32: make FILETIME conversion functions public
118:  e1cff98998 = 118:  1baac550b0 Win32: dirent.c: Move opendir down
119:  c368cbcc0b = 119:  de5c2e26ec mingw: make the dirent implementation pluggable
120:  ad9235eec2 = 120:  3d59b9f065 Win32: make the lstat implementation pluggable
121:  4a69b9177e = 121:  4abba63c98 mingw: add infrastructure for read-only file system level caches
122:  c3a1fb8666 = 122:  bf0ba34e66 mingw: add a cache below mingw's lstat and dirent implementations
123:  3579f972d3 = 123:  48ee14cd93 fscache: load directories only once
124:  db5cf8eb13 = 124:  0d29c23c7a fscache: add key for GIT_TRACE_FSCACHE
125:  62e3172267 = 125:  4f258b5b17 fscache: remember not-found directories
126:  c447364d41 = 126:  c3685467a7 fscache: add a test for the dir-not-found optimization
127:  248dc95154 = 127:  56d070c2b4 add: use preload-index and fscache for performance
128:  f0f2fb2ded = 128:  ab95b5e1eb dir.c: make add_excludes aware of fscache during status
129:  3382b7fa5d = 129:  b5c6034e10 fscache: make fscache_enabled() public
130:  e14cb5f847 = 130:  38415469bf dir.c: regression fix for add_excludes with fscache
131:  c987f35265 = 131:  2aff925e90 fetch-pack.c: enable fscache for stats under .git/objects
132:  83289ac603 = 132:  f6b2cd77b1 checkout.c: enable fscache for checkout again
133:  ec87c84de7 = 133:  6bfcd05ad9 Enable the filesystem cache (fscache) in refresh_index().
134:  b72e7cd9a2 = 134:  6d20a8aabe fscache: use FindFirstFileExW to avoid retrieving the short name
135:  3c80de2b25 = 135:  d7fdcf0026 fscache: add GIT_TEST_FSCACHE support
136:  bea20e1310 = 136:  717efb424b fscache: add fscache hit statistics
137:  d79777f781 = 137:  7ac7fe7d9e unpack-trees: enable fscache for sparse-checkout
138:  76f99501ee = 138:  5b50f1a4ab status: disable and free fscache at the end of the status command
139:  d15e8b6aff = 139:  5761530d25 mem_pool: add GIT_TRACE_MEMPOOL support
140:  37e4eedc26 = 140:  50fca085da fscache: fscache takes an initial size
141:  44f5498566 = 141:  5a6308bb9e fscache: update fscache to be thread specific instead of global
142:  451376996d = 142:  575737e8a5 fscache: teach fscache to use mempool
143:  839c043af0 = 143:  559f0ef639 fscache: make fscache_enable() thread safe
144:  044954ddb0 = 144:  f5991394fa fscache: teach fscache to use NtQueryDirectoryFile
145:  227f6eae19 = 145:  7cf606bb02 fscache: remember the reparse tag for each entry
146:  c8b25e0282 = 146:  35e1954011 fscache: implement an FSCache-aware is_mount_point()
147:  7ed11382c2 = 147:  52cbfcb41e clean: make use of FSCache
148:  53f690ccd1 = 148:  b929bb53ef pack-objects (mingw): demonstrate a segmentation fault with large deltas
149:  de7c021f2d = 149:  f6d330ff13 mingw: support long paths
150:  badf2a7172 = 150:  582a26c77f win32(long path support): leave drive-less absolute paths intact
151:  94d520d0a9 = 151:  fc7f1c99a4 compat/fsmonitor/fsm-*-win32: support long paths
152:  c3e9e8420c = 152:  8e07ad8dd6 clean: suggest using `core.longPaths` if paths are too long to remove
153:  610c7ad8ec = 153:  cb2adf636f mingw: Support `git_terminal_prompt` with more terminals
154:  c3847f8eb4 = 154:  e5ef01a622 compat/terminal.c: only use the Windows console if bash 'read -r' fails
155:  505d51391e = 155:  7814122fd4 mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
156:  8a71b7655b = 156:  d589b53006 mingw: introduce code to detect whether we're inside a Windows container
158:  685c88991b = 157:  df3e2d7c7f git-gui--askyesno: fix funny text wrapping
157:  2ba091d06b = 158:  882aff7b23 mingw: when running in a Windows container, try to rename() harder
160:  b66c725ba8 = 159:  880ce47367 git-gui--askyesno (mingw): use Git for Windows' icon, if available
159:  2099600b71 = 160:  6438a6e1fb mingw: move the file_attr_to_st_mode() function definition
162:  17109e37be = 161:  b7bb24a4f3 Win32: symlink: move phantom symlink creation to a separate function
163:  a715125961 = 162:  5509fec59e Introduce helper to create symlinks that knows about index_state
164:  83e4ec894f = 163:  d6e081064d mingw: allow to specify the symlink type in .gitattributes
165:  fb15cb556a = 164:  1c717436e5 Win32: symlink: add test for `symlink` attribute
166:  f74f31678e = 165:  899662b00b mingw: explicitly specify with which cmd to prefix the cmdline
167:  87208d4045 = 166:  0e3260c461 mingw: when path_lookup() failed, try BusyBox
168:  8da5fd6d63 = 167:  bd17c54fcd test-tool: learn to act as a drop-in replacement for `iconv`
169:  c949515172 = 168:  d7841cdc18 tests(mingw): if `iconv` is unavailable, use `test-helper --iconv`
170:  cb41ef7659 = 169:  60a4a79e8d gitattributes: mark .png files as binary
171:  80d09425c3 = 170:  2f783e809e tests: move test PNGs into t/lib-diff/
172:  f15ccd9272 = 171:  777c3bdd7c tests: only override sort & find if there are usable ones in /usr/bin/
173:  a1bf2d3d07 ! 172:  218cb86277 tests: use the correct path separator with BusyBox
    @@ t/test-lib.sh
     +
      # Test the binaries we have just built.  The tests are kept in
      # t/ subdirectory and are run in 'trash directory' subdirectory.
    - 
    + if test -z "$TEST_DIRECTORY"
     @@ t/test-lib.sh: then
      		done
      	done
174:  3c2440b2e5 = 173:  f1f1e953e1 mingw: only use Bash-ism `builtin pwd -W` when available
175:  7259fba60d = 174:  02c577c6a5 tests (mingw): remove Bash-specific pwd option
176:  dc9551194f = 175:  c9d876c095 test-lib: add BUSYBOX prerequisite
177:  baa88878fa = 176:  5a222e6ed6 t5003: use binary file from t/lib-diff/
178:  f2d9c638cf = 177:  68e8ec8594 t5532: workaround for BusyBox on Windows
179:  24c4f5ebe1 = 178:  c95cb031cd t5605: special-case hardlink test for BusyBox-w32
161:  d2827b38fa = 179:  1ebcc81521 mingw: Windows Docker volumes are *not* symbolic links
180:  99d8f72b8c = 180:  ebaa4f98e1 t5813: allow for $PWD to be a Windows path
181:  21da2e4dcc = 181:  b268b9ab25 mingw: work around rename() failing on a read-only file
184:  aa6552d8ac ! 182:  407b4baa10 t9200: skip tests when $PWD contains a colon
    @@ t/t9200-git-cvsexportcommit.sh: if ! test_have_prereq PERL; then
     +	;;
     +esac
     +
    - status=0; cvs >/dev/null 2>&1 || status=$?
    - if test $status -ne 1
    + cvs >/dev/null 2>&1
    + if test $? -ne 1
      then
188:  2c16e3bdc0 = 183:  04851116e9 mingw: optionally enable wsl compability file mode bits
182:  4e67dbbdf4 = 184:  137b49956e Describe Git for Windows' architecture [no ci]
185:  da6076db69 = 185:  4713033a17 mingw: kill child processes in a gentler way
183:  1af7525629 = 186:  a6a0b5d064 Modify the Code of Conduct for Git for Windows
189:  3f4a01b8d7 = 187:  df0ac6263c mingw: really handle SIGINT
186:  a7447ea8dc = 188:  89cd72cfe7 CONTRIBUTING.md: add guide for first-time contributors
190:  d6a0b9bd40 = 189:  d309fe5281 Partially un-revert "editor: save and reset terminal after calling EDITOR"
191:  b517090a13 = 190:  aa386396a4 README.md: Add a Windows-specific preamble
192:  e85c7d67f7 = 191:  c0041ec008 reset: reinstate support for the deprecated --stdin option
195:  4e749fa19e = 192:  84599d563e Add an issue template
187:  c3e351c8d9 = 193:  0e43e08f72 Add a GitHub workflow to monitor component updates
193:  46d27f6c3d = 194:  d80592c80e fsmonitor: reintroduce core.useBuiltinFSMonitor
196:  7ee407af05 = 195:  db71d26a77 Modify the GitHub Pull Request template (to reflect Git for Windows)
194:  74c34e9659 = 196:  3c2df8b2a5 dependabot: help keeping GitHub Actions versions up to date
197:  58bc7d206c = 197:  6ecde93073 SECURITY.md: document Git for Windows' policies
198:  b9fc28424d = 198:  c94e339e68 http: fix bug in ntlm_allow=1 handling
199:  86dcc2f1b3 = 199:  d493ed9e28 fixup! git-svn: mark it as unsupported by the Git for Windows project

dscho and others added 30 commits March 27, 2026 02:01
After importing anything with fast-import, we should always let the
garbage collector do its job, since the objects are written to disk
inefficiently.

This brings down an initial import of http://selenic.com/hg from about
230 megabytes to about 14.

In the future, we may want to make this configurable on a per-remote
basis, or maybe teach fast-import about it in the first place.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
On Windows, there are several categories of absolute paths. One such
category starts with a backslash and is implicitly relative to the drive
associated with the current working directory. Example:

	c:
	git clone https://github.com/git-for-windows/git \G4W

should clone into C:\G4W.

Back in 2017, Juan Carlos Arevalo Baeza reported a bug in Git's handling
of those absolute paths was identified, and fixed. Let's make sure that
it stays fixed.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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>
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>
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>
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>
dscho and others added 30 commits March 27, 2026 02:03
…ws#4527)

With this patch, Git for Windows works as intended on mounted APFS
volumes (where renaming read-only files would fail).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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>
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.