Skip to content

Rebase to v2.55.0 - #6301

Merged
gitforwindowshelper[bot] merged 375 commits into
mainfrom
rebase-to-v2.55.0
Jun 29, 2026
Merged

Rebase to v2.55.0#6301
gitforwindowshelper[bot] merged 375 commits into
mainfrom
rebase-to-v2.55.0

Conversation

@dscho

@dscho dscho commented Jun 29, 2026

Copy link
Copy Markdown
Member
Range-diff relative to
  • 1: 263c5a1 = 1: d14c7fe ci(dockerized): reduce the PID limit for private repositories

  • 2: ec2c315 = 2: af27e77 mingw: skip symlink type auto-detection for network share targets

  • 3: f331752 = 3: 66899cc unix-socket: avoid leak when initialization fails

  • 4: 72e58d2 = 4: 785f0eb grep: prevent ^$ false match at end of file

  • 17: 9995a7e = 5: 374678a t9350: point out that refs are not updated correctly

  • 18: 9ffcbaa = 6: c50d941 transport-helper: add trailing --

  • 22: 0fe29c5 = 7: 882f0ab remote-helper: check helper status after import/export

  • 143: 6ab6ea9 = 8: 40dea9c ci: bump actions/checkout from 6 to 7

  • 28: 832c67e = 9: b520203 Always auto-gc after calling a fast-import transport

  • 19: 49575d5 = 10: 16eafc7 mingw: demonstrate a git add issue with NTFS junctions

  • 23: 2f60eef = 11: 8f9894b strbuf_realpath(): use platform-dependent API if available

  • 26: e1a87ba = 12: c66c364 mingw: include the Python parts in the build

  • 29: 9edd8ee = 13: 35e6727 mingw: prevent regressions with "drive-less" absolute paths

  • 30: 3830fb3 = 14: 97557f9 transport: optionally disable side-band-64k

  • 31: feaf47a = 15: 59f7d97 mingw: fix fatal error working on mapped network drives on Windows

  • 32: 073ebd5 = 16: aa65e17 clink.pl: fix MSVC compile script to handle libcurl-d.lib

  • 33: 9bb8b61 = 17: 955b4cc mingw: implement a platform-specific strbuf_realpath()

  • 20: 7efccf6 = 18: db9c85d ci(vs-build): adapt to Visual Studio 2026 default on windows-latest

  • 24: eae4e6c = 19: 1746400 vcpkg_install: detect lack of Git

  • 21: 72d7951 = 20: 40b9c78 t5505/t5516: allow running without .git/branches/ in the templates

  • 38: 2f619cc = 21: 34e9d7f vcpkg_install: add comment regarding slow network connections

  • 25: 3376190 = 22: cb7a30d http: use new "best effort" strategy for Secure Channel revoke checking

  • 27: 5800cb6 = 23: 0350f6c t5505/t5516: fix white-space around redirectors

  • 34: 88887c3 = 24: dc7d556 t3701: verify that we can add lots of files interactively

  • 35: 53b28fd = 25: 806f591 commit: accept "scissors" with CR/LF line endings

  • 36: 3f84b3d = 26: 66b8a42 t0014: fix indentation

  • 37: c5a2832 = 27: 3dfcb74 git-gui: accommodate for intent-to-add files

  • 39: 72bbead = 28: 1ee8fa8 vcbuild: install ARM64 dependencies when building ARM64 binaries

  • 40: b1be893 = 29: c595f1b vcbuild: add an option to install individual 'features'

  • 41: 3cba7c6 = 30: 5c06fe1 cmake: allow building for Windows/ARM64

  • 42: 8b03d88 = 31: c0966a9 ci(vs-build) also build Windows/ARM64 artifacts

  • 43: 62bf067 ! 32: 9b4aa71 Add schannel to curl installation

    @@ Metadata
     Author: Dennis Ameling <dennis@dennisameling.com>
     
      ## Commit message ##
    -    Add schannel to curl installation
    +    vcbuild: stop hard-coding OpenSSL as a dependency
    +
    +    Git for Windows' default SSL backend is actually Secure Channel. Let's
    +    not hard-code any backend, just ask for _any_ SSL backend.
    +
    +    This is necessary because we cannot ask for `schannel`, as
    +    https://github.com/microsoft/vcpkg/pull/46459 removed the option to
    +    specify that as a feature.
     
         Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
    +    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
     
      ## compat/vcbuild/vcpkg_install.bat ##
     @@ compat/vcbuild/vcpkg_install.bat: set features=
    @@ compat/vcbuild/vcpkg_install.bat: set features=
      
      :curl_features
     -set features=[core,openssl]
    -+set features=[core,openssl,schannel]
    ++set features=[core,ssl]
      goto :EOF
  • 45: 94e4388 = 33: ef39dd2 cmake(): allow setting HOST_CPU for cross-compilation

  • 56: a239991 = 34: 728344b mingw: allow for longer paths in parse_interpreter()

  • 57: af1e65d = 35: d76effc compat/vcbuild: document preferred way to build in Visual Studio

  • 58: 98f971d = 36: b61056e http: optionally send SSL client certificate

  • 44: 38abcbd = 37: 758e5fb hash-object: demonstrate a >4GB/LLP64 problem

  • 46: 63b0e0e = 38: acdc5d7 object-file.c: use size_t for header lengths

  • 47: 6374962 = 39: 72e90be CMake: default Visual Studio generator has changed

  • 48: 340be5f = 40: 7809b68 hash algorithms: use size_t for section lengths

  • 49: c74bdc9 = 41: 2527673 .gitignore: add Visual Studio CMakeSetting.json file

  • 50: c73695e = 42: 9bacd42 hash-object --stdin: verify that it works with >4GB/LLP64

  • 51: 95f02b0 = 43: 85b91d4 subtree: update contrib/subtree test target

  • 52: 5b57c11 = 44: b3bfe91 CMakeLists: add default "x64-windows" arch for Visual Studio

  • 53: b73ddeb = 45: 3a16614 hash-object: add another >4GB/LLP64 test case

  • 59: b1374c9 = 46: c3b7537 ci: run contrib/subtree tests in CI builds

  • 60: 55075c5 = 47: 60c7071 CMake: show Win32 and Generator_platform build-option values

  • 61: b1434ca = 48: 9f841f9 hash-object: add a >4GB/LLP64 test case using filtered input

  • 54: eb76891 = 49: 8e5f364 setup: properly use "%(prefix)/" when in WSL

  • 55: efd8f4b = 50: 97ca3a4 Add config option windows.appendAtomically

  • 83: dff53de = 51: 3247bed MinGW: link as terminal server aware

  • 62: e4850cb = 52: 963d550 compat/mingw.c: do not warn when failing to get owner

  • 63: 5637272 = 53: 53344ce mingw: $env:TERM="xterm-256color" for newer OSes

  • 64: e9c0f49 = 54: 086ff42 winansi: check result and Buffer before using Name

  • 65: f43c118 = 55: 9b74743 mingw: change core.fsyncObjectFiles = 1 by default

  • 90: 8ce728b = 56: c45087d Fix Windows version resources

  • 66: 9c4ca19 = 57: fa6db0a windows: skip linking git-<command> for built-ins

  • 67: a18079c = 58: 471141c mingw: stop hard-coding CC = gcc

  • 68: 8a7043a = 59: e7adae6 mingw: drop the -D_USE_32BIT_TIME_T option

  • 69: 55fb465 = 60: d746cbb mingw: only use -Wl,--large-address-aware for 32-bit builds

  • 70: b239f5d = 61: e929281 mingw: avoid over-specifying --pic-executable

  • 71: d5cce95 = 62: 98d857f mingw: set the prefix and HOST_CPU as per MSYS2's settings

  • 72: a7eb977 = 63: 62c761b mingw: only enable the MSYS2-specific stuff when compiling in MSYS2

  • 73: 7292955 = 64: dfd9bd2 mingw: rely on MSYS2's metadata instead of hard-coding it

  • 74: de6d9f0 = 65: 055cc8a mingw: always define ETC_* for MSYS2 environments

  • 75: 3e21a2f = 66: 1bd0017 max_tree_depth: lower it for clang builds in general on Windows

  • 76: e6e71bc = 67: 33bcead mingw: ensure valid CTYPE

  • 77: 94801b2 = 68: ad1a584 mingw: allow git.exe to be used instead of the "Git wrapper"

  • 91: 3da9eb3 = 69: d2a7526 status: fix for old-style submodules with commondir

  • 78: f7be74d = 70: dec44ca mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory

  • 79: 1b3c54a = 71: 584f7df clink.pl: fix libexpatd.lib link error when using MSVC

  • 80: e3c669d = 72: 363e250 Makefile: clean up .ilk files when MSVC=1

  • 81: a262ba9 = 73: e42bbf4 vcbuild: add support for compiling Windows resource files

  • 82: 4b1a391 = 74: fd68f01 config.mak.uname: add git.rc to MSVC builds

  • 84: 56ce0e5 = 75: b653fa2 clink.pl: ignore no-stack-protector arg on MSVC=1 builds

  • 86: de1045c = 76: af005e2 clink.pl: move default linker options for MSVC=1 builds

  • 88: 63aad5e = 77: 3e13c06 cmake: install headless-git.

  • 92: 0f82c8d = 78: 5688352 git.rc: include winuser.h

  • 85: 4ce531c = 79: 110cf4d http: optionally load libcurl lazily

  • 87: f6ee541 = 80: 0b68eb7 http: support lazy-loading libcurl also on Windows

  • 89: 069f93e = 81: 934b065 http: when loading libcurl lazily, allow for multiple SSL backends

  • 93: 057ead6 = 82: ea73840 mingw: do load libcurl dynamically by default

  • 144: bb104c3 = 83: ddacb57 Add a GitHub workflow to verify that Git/Scalar work in Nano Server

  • 94: 3acd7b5 = 84: c1086c7 mingw: suggest windows.appendAtomically in more cases

  • 95: 135fb01 = 85: 6656931 win32: use native ANSI sequence processing, if possible

  • 99: 233c6cd = 86: d5ce477 revision: create mark_trees_uninteresting_dense()

  • 96: c7e2c95 = 87: 67ecfcf common-main.c: fflush stdout buffer upon exit

  • 97: 0824b83 = 88: eeac35b t5601/t7406(mingw): do run tests with symlink support

  • 98: ee4c172 = 89: ff08a3c Fallback to AppData if XDG_CONFIG_HOME is unset

  • 117: 4af6b91 = 90: 7d5245b run-command: be helpful with Git LFS fails on Windows 7

  • 100: 552f69b = 91: 4df70a4 survey: stub in new experimental 'git-survey' command

  • 101: 6187d06 = 92: f5aa03a survey: add command line opts to select references

  • 102: 0292ff4 = 93: 35ecab6 survey: start pretty printing data in table form

  • 103: a6293cb = 94: 098aeda survey: add object count summary

  • 104: d367495 = 95: d2d7657 survey: summarize total sizes by object type

  • 105: 9030fe5 = 96: 9929c61 survey: show progress during object walk

  • 108: 6c97618 = 97: cd19a00 survey: add ability to track prioritized lists

  • 111: 97588c1 = 98: 6be9db7 survey: add report of "largest" paths

  • 114: 0fe7495 = 99: e69d05f survey: add --top= option and config

  • 106: 20709bc = 100: 66e1be9 mingw: make sure errno is set correctly when socket operations fail

  • 118: aed8e23 = 101: 8ea36b6 survey: clearly note the experimental nature in the output

  • 107: e8e4c46 = 102: fa66c2a t5563: verify that NTLM authentication works

  • 109: 8c80890 = 103: f801035 compat/mingw: handle WSA errors in strerror

  • 110: 4456113 = 104: 4ca4b4c http: disallow NTLM authentication by default

  • 112: e303889 = 105: b9111c1 compat/mingw: drop outdated comment

  • 113: 27ecaa6 = 106: 03398c0 http: warn if might have failed because of NTLM

  • 115: 80c250f = 107: 95af445 t0301: actually test credential-cache on Windows

  • 116: 68de1e7 = 108: 51703f5 credential: advertise NTLM suppression and allow helpers to re-enable

  • 119: 3e45265 = 109: 8215d0d credential-cache: handle ECONNREFUSED gracefully

  • 120: 1e7e5b1 = 110: 2f66493 reftable: do make sure to use custom allocators

  • 121: b23b449 = 111: 8cf83e2 check-whitespace: avoid alerts about upstream commits

  • 122: ce08145 = 112: d02d96a t/t5571-prep-push-hook.sh: Add test with writing to stderr

  • 128: 42ca95d = 113: 4729347 mingw: Support git_terminal_prompt with more terminals

  • 129: 6114428 = 114: e38ec6f compat/terminal.c: only use the Windows console if bash 'read -r' fails

  • 130: ead6a13 = 115: 201144e mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method

  • 123: 4a9956b = 116: 80eee1e dir: do not traverse mount points

  • 124: a1d0874 = 117: e36e8b3 win32: thread-utils: handle multi-socket systems

  • 125: 68290ba = 118: daa7cb8 t5563: add tests for http.emptyAuth with Negotiate

  • 126: f7e68b5 = 119: 696cadb entry: flush fscache after creating directories and writing files

  • 127: 30ae468 = 120: 2425a00 ci(macos): skip the git p4 tests

  • 131: 379a7ed = 121: edef24d Win32: symlink: move phantom symlink creation to a separate function

  • 132: 1f5203f = 122: 6f26c2e mingw: introduce code to detect whether we're inside a Windows container

  • 133: dad078f = 123: 7742d6e Introduce helper to create symlinks that knows about index_state

  • 134: d81066e = 124: 1d0d2da mingw: when running in a Windows container, try to rename() harder

  • 135: 1154eb8 = 125: 3b0859e mingw: allow to specify the symlink type in .gitattributes

  • 136: 5cf4349 = 126: 6efb3e0 mingw: move the file_attr_to_st_mode() function definition

  • 137: 481bf41 = 127: 00cc072 Win32: symlink: add test for symlink attribute

  • 138: ec856f6 = 128: 0aec489 mingw: Windows Docker volumes are not symbolic links

  • 139: c812545 = 129: 9c7424b clean: do not traverse mount points

  • 140: 2e5efaa = 130: a373517 mingw: work around rename() failing on a read-only file

  • 141: 8e94905 = 131: ad46370 clean: remove mount points when possible

  • 145: 6b11df0 = 132: 08aa7f0 diff-delta: widen struct delta_index size fields to size_t

  • 146: 99c9379 = 133: f547327 delta: widen create_delta_index() parameter to size_t

  • 147: 0176718 = 134: f9115fb pack-objects: widen delta-cache accounting to size_t

  • 148: 025d742 = 135: e3eeda3 pack-objects: widen free_unpacked() return to size_t

  • 149: 259713f = 136: d6a088d pack-objects: widen mem_usage and try_delta out-param to size_t

  • 150: 8f7356e = 137: d0c0268 delta: widen create_delta() and diff_delta() to size_t

  • 142: a2e4396 = 138: b314d6d mingw: optionally enable wsl compability file mode bits

  • 172: fdea8ca ! 139: f9b8367 Refuse to follow invalid paths in .git files

    @@ setup.c: const char *read_gitfile_gently(const char *path, int *return_error_cod
      	}
     +#if (defined _WIN32 || defined __WIN32__)
     +	if (is_dir_sep(dir[0]) && is_invalid_dotgit_path(path, dir)) {
    ++		strbuf_reset(&realpath);
     +		strbuf_add(&realpath, dir, strlen(dir));
     +		path = realpath.buf;
     +		goto cleanup_return;
    @@ setup.c: const char *read_gitfile_gently(const char *path, int *return_error_cod
      	if (!is_git_directory(dir)) {
      		error_code = READ_GITFILE_ERR_NOT_A_REPO;
      		goto cleanup_return;
    + 	}
    + 
    ++	strbuf_reset(&realpath);
    + 	strbuf_realpath(&realpath, dir, 1);
    + 	path = realpath.buf;
    + 
     
      ## t/t5580-unc-paths.sh ##
     @@ t/t5580-unc-paths.sh: test_expect_success clone '
  • 151: 884e8bb = 140: a3d106d packfile, git-zlib: widen use_pack() and zstream avail fields to size_t

  • 152: 89c8ca8 = 141: f7abcba archive-zip: widen zlib_deflate_raw()'s maxsize local to size_t

  • 153: 8a46bf3 = 142: b114b4c diff: widen deflate_it()'s bound local from int to size_t

  • 154: 759542b = 143: b191f55 http-push: widen start_put()'s size local from ssize_t to size_t

  • 155: c26d708 = 144: 214e5aa t/helper/test-pack-deltas: widen do_compress()'s maxsize local to size_t

  • 156: 9ad39d0 = 145: 574d35e git-zlib: widen git_deflate_bound() to size_t

  • 157: 73510d4 = 146: 877b9f1 diff: stop truncating the deflated-binary-diff size on Windows

  • 158: 71c8cac = 147: b0ab6b3 convert: widen gather_convert_stats() helpers to size_t

  • 159: f95e2e4 = 148: c809997 read-cache: stop truncating index blob sizes on Windows

  • 160: ebb6368 = 149: d7b636e xdiff-interface: widen buffer_is_binary() size parameter to size_t

  • 161: a551c40 = 150: 1d1c735 combine-diff: stop truncating combined-diff blob sizes on Windows

  • 5: 967ab3a = 151: 8588db3 pack-bitmap: stop truncating blob sizes used by --filter=blob:limit

  • 6: 9a3aef4 = 152: 83f79b2 tree-walk: drop link_len cast in get_tree_entry_follow_symlinks()

  • 7: d592ee7 = 153: 4887591 tree-walk: widen init_tree_desc() and init_tree_desc_gently() to size_t

  • 162: 518d12a = 154: b9a3a29 diff: widen textconv_object() size out-param to size_t

  • 8: cc9189f = 155: 7c52478 pack-objects: drop the two tree-walk casts in the preferred-base path

  • 163: 4bfc098 = 156: 3fbab76 diffcore: widen struct diff_filespec.size to size_t

  • 9: c45f1ad = 157: 23707af diff-delta: widen sizeof_delta_index() return to size_t

  • 10: d835c8c = 158: b0482ec tree: widen struct tree.size and parse_tree_buffer() to size_t

  • 11: ad6b453 = 159: 1a8ee4a commit: widen the commit-buffer API to size_t

  • 12: 7ad17a4 = 160: ae5ac8f blame: widen find_line_starts() len parameter to size_t

  • 13: 4b2d8ba = 161: 38e4d60 grep: widen struct grep_source.size and grep_buffer() to size_t

  • 14: 31d4885 = 162: 663a6fb fast-export: drop the export_blob() size cast and widen anonymize_blob()

  • 15: 481b8d0 = 163: f91302c repo: drop the inflated-size cast in count_objects()

  • 16: fc440e5 = 164: b0512d0 unpack-objects: widen the size-passing infrastructure to size_t

  • 164: ef39dc9 = 165: b2c4636 pack-objects: drop cast_size_t_to_ulong shims in get_delta()

  • 165: f7e9832 = 166: a79a242 pack-objects: drop cast_size_t_to_ulong shims in try_delta()

  • 166: 3a9356b = 167: 2299301 pack-objects: drop the last size shim in write_no_reuse_object()

  • 167: a770deb = 168: 9550ed9 blame: widen struct blame_scoreboard.final_buf_size to size_t

  • 168: 5732625 = 169: 5eced98 fast-import: drop the six size casts in the object-read paths

  • 169: f8d7168 = 170: c0930a7 t/helper/test-pack-deltas: drop the delta_size cast in write_ref_delta()

  • 170: 3e74a2e = 171: cbebf58 Drop the cast_size_t_to_ulong() helper

  • 171: 28114d6 = 172: 9948570 coverity: skip building with Rust, for now

  • 175: 94375bc = 173: 5295125 Win32: make FILETIME conversion functions public

  • 176: e67cd5e = 174: 1fbc575 Win32: dirent.c: Move opendir down

  • 177: 755dd19 = 175: e47f876 mingw: make the dirent implementation pluggable

  • 178: de5b1c9 = 176: 789cce3 Win32: make the lstat implementation pluggable

  • 179: c692f14 = 177: 828fba0 mingw: add infrastructure for read-only file system level caches

  • 180: e5fcf03 = 178: f721b71 mingw: add a cache below mingw's lstat and dirent implementations

  • 181: 8cdd62e = 179: 76033a2 fscache: load directories only once

  • 182: 1df5f6c = 180: 57f1941 fscache: add key for GIT_TRACE_FSCACHE

  • 173: cb9ed6d = 181: 34867a3 git-gui--askyesno: fix funny text wrapping

  • 183: 719497d = 182: dae9786 fscache: remember not-found directories

  • 174: b776c12 = 183: 97841aa git-gui--askyesno (mingw): use Git for Windows' icon, if available

  • 184: c56c8b4 = 184: 3f6cb81 fscache: add a test for the dir-not-found optimization

  • 185: 25c4d36 = 185: a2acda4 add: use preload-index and fscache for performance

  • 186: 1b0ba23 = 186: 60a91f2 dir.c: make add_excludes aware of fscache during status

  • 187: 0c38516 = 187: 781696d fscache: make fscache_enabled() public

  • 188: 2164d45 = 188: a9cb81e dir.c: regression fix for add_excludes with fscache

  • 189: adb36c0 = 189: d967a00 fetch-pack.c: enable fscache for stats under .git/objects

  • 190: 0dd80d4 = 190: 7cd9b48 checkout.c: enable fscache for checkout again

  • 191: 97008ff = 191: 045ecbb Enable the filesystem cache (fscache) in refresh_index().

  • 192: 7f0d9fc = 192: 633549a fscache: use FindFirstFileExW to avoid retrieving the short name

  • 193: a749fcb = 193: ffc2bcb fscache: add GIT_TEST_FSCACHE support

  • 194: 4671b8d = 194: 930225d fscache: add fscache hit statistics

  • 195: 5044602 = 195: bf04a41 unpack-trees: enable fscache for sparse-checkout

  • 196: b4fa17d = 196: e3fc287 status: disable and free fscache at the end of the status command

  • 197: d4f1a01 = 197: cb4b2b6 mem_pool: add GIT_TRACE_MEMPOOL support

  • 198: 47dfe51 = 198: 33c9b66 fscache: fscache takes an initial size

  • 199: 33d090c = 199: 2c8b97f fscache: update fscache to be thread specific instead of global

  • 200: dd3451d = 200: 7591efa fscache: teach fscache to use mempool

  • 201: ea38710 = 201: 3eda567 fscache: make fscache_enable() thread safe

  • 202: 9f96bfc = 202: dfbce1b fscache: teach fscache to use NtQueryDirectoryFile

  • 203: 0ac9c0e = 203: 5164e8b fscache: remember the reparse tag for each entry

  • 204: 6ba78db = 204: 292e0c1 fscache: Windows Docker volumes are not symbolic links

  • 205: 77ab4c8 = 205: 98f89db fscache: optionally enable wsl compability file mode bits

  • 206: 78d5e61 = 206: 2c42f63 fscache: implement an FSCache-aware is_mount_point()

  • 207: 252f120 = 207: e9e642f clean: make use of FSCache

  • 208: f3b8450 = 208: 84a8e06 pack-objects (mingw): demonstrate a segmentation fault with large deltas

  • 209: 80a7466 = 209: 9b7881d mingw: support long paths

  • 210: 68a0a5a = 210: acd19f6 win32(long path support): leave drive-less absolute paths intact

  • 211: 0db2004 = 211: 3830de6 compat/fsmonitor/fsm-*-win32: support long paths

  • 212: bdf50a5 = 212: 73ae0c9 clean: suggest using core.longPaths if paths are too long to remove

  • 213: 42b3d96 = 213: 277c715 mingw: explicitly specify with which cmd to prefix the cmdline

  • 214: 062d523 = 214: dd28789 mingw: when path_lookup() failed, try BusyBox

  • 215: 7504528 = 215: 5fbb8d2 test-tool: learn to act as a drop-in replacement for iconv

  • 216: 4766fef = 216: c9f34f8 tests(mingw): if iconv is unavailable, use test-helper --iconv

  • 217: b7c9ef9 = 217: 7cd1dff gitattributes: mark .png files as binary

  • 218: f73da52 = 218: d48d198 tests: move test PNGs into t/lib-diff/

  • 219: e764cf5 = 219: 044182f tests: only override sort & find if there are usable ones in /usr/bin/

  • 220: f786739 = 220: 2c48841 tests: use the correct path separator with BusyBox

  • 221: afc8552 = 221: 0fd4359 mingw: only use Bash-ism builtin pwd -W when available

  • 222: 84441ec = 222: 67df04a tests (mingw): remove Bash-specific pwd option

  • 223: 0ab9da2 = 223: af4f1d4 test-lib: add BUSYBOX prerequisite

  • 224: 74a758c = 224: d586260 t5003: use binary file from t/lib-diff/

  • 225: c735a08 = 225: 39ea2c0 t5532: workaround for BusyBox on Windows

  • 226: a479ce0 = 226: 95bb69c t5605: special-case hardlink test for BusyBox-w32

  • 227: 82a2fc7 = 227: 53cbcfc t5813: allow for $PWD to be a Windows path

  • 228: 7f4ffb7 = 228: a6aa3c8 t9200: skip tests when $PWD contains a colon

  • 233: 87b1756 = 229: c831b76 Partially un-revert "editor: save and reset terminal after calling EDITOR"

  • 234: c84bebf = 230: 369e489 reset: reinstate support for the deprecated --stdin option

  • 229: 495424f = 231: efc4344 Describe Git for Windows' architecture

  • 230: 46090eb = 232: 0e7582c Add an AGENTS.md file to help with AI-assisted debugging/development

  • 232: 50402b1 = 233: 790003f Modify the Code of Conduct for Git for Windows

  • 237: e359666 = 234: 9511b9f CONTRIBUTING.md: add guide for first-time contributors

  • 238: 096152a = 235: ab988e9 README.md: Add a Windows-specific preamble

  • 231: fa78f54 = 236: bdbc5a5 Add a GitHub workflow to monitor component updates

  • 239: 549231d = 237: 3913a2a Add an issue template

  • 235: 9198a97 = 238: 2d5aad5 fsmonitor: reintroduce core.useBuiltinFSMonitor

  • 236: d2739d6 = 239: 463c323 dependabot: help keeping GitHub Actions versions up to date

  • 240: 2e5a3ba = 240: e47c424 Modify the GitHub Pull Request template (to reflect Git for Windows)

  • 241: d620dd0 = 241: bf2f042 SECURITY.md: document Git for Windows' policies

  • 242: 0087c98 = 242: a0840aa ci: only run the expensive tests in the Windows tests for now

  • 243: f8de6ca < -: ------------- amend! Add schannel to curl installation

This PR closes #6300.

dscho and others added 30 commits June 29, 2026 19:06
Windows 10 version 1511 (also known as Anniversary Update), according to
https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences
introduced native support for ANSI sequence processing. This allows
using colors from the entire 24-bit color range.

All we need to do is test whether the console's "virtual processing
support" can be enabled. If it can, we do not even need to start the
`console_thread` to handle ANSI sequences.

Or, almost all we need to do: When `console_thread()` does its work, it
uses the Unicode-aware `write_console()` function to write to the Win32
Console, which supports Git for Windows' implicit convention that all
text that is written is encoded in UTF-8. The same is not necessarily
true if native ANSI sequence processing is used, as the output is then
subject to the current code page. Let's ensure that the code page is set
to `CP_UTF8` as long as Git writes to it.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
By default, the buffer type of Windows' `stdout` is unbuffered (_IONBF),
and there is no need to manually fflush `stdout`.

But some programs, such as the Windows Filtering Platform driver
provided by the security software, may change the buffer type of
`stdout` to full buffering. This nees `fflush(stdout)` to be called
manually, otherwise there will be no output to `stdout`.

Signed-off-by: MinarKotonoha <chengzhuo5@qq.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
A long time ago, we decided to run tests in Git for Windows' SDK with
the default `winsymlinks` mode: copying instead of linking. This is
still the default mode of MSYS2 to this day.

However, this is not how most users run Git for Windows: As the majority
of Git for Windows' users seem to be on Windows 10 and newer, likely
having enabled Developer Mode (which allows creating symbolic links
without administrator privileges), they will run with symlink support
enabled.

This is the reason why it is crucial to get the fixes for CVE-2024-? to
the users, and also why it is crucial to ensure that the test suite
exercises the related test cases. This commit ensures the latter.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In order to be a better Windows citizenship, Git should
save its configuration files on AppData folder. This can
enables git configuration files be replicated between machines
using the same Microsoft account logon which would reduce the
friction of setting up Git on new systems. Therefore, if
%APPDATA%\Git\config exists, we use it; otherwise
$HOME/.config/git/config is used.

Signed-off-by: Ariel Lourenco <ariellourenco@users.noreply.github.com>
Git LFS is now built with Go 1.21 which no longer supports Windows 7.
However, Git for Windows still wants to support Windows 7.

Ideally, Git LFS would re-introduce Windows 7 support until Git for
Windows drops support for Windows 7, but that's not going to happen:
#4996 (comment)

The next best thing we can do is to let the users know what is
happening, and how to get out of their fix, at least.

This is not quite as easy as it would first seem because programs
compiled with Go 1.21 or newer will simply throw an exception and fail
with an Access Violation on Windows 7.

The only way I found to address this is to replicate the logic from Go's
very own `version` command (which can determine the Go version with
which a given executable was built) to detect the situation, and in that
case offer a helpful error message.

This addresses #4996.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The sparse tree walk algorithm was created in d5d2e93 (revision:
implement sparse algorithm, 2019-01-16) and involves using the
mark_trees_uninteresting_sparse() method. This method takes a repository
and an oidset of tree IDs, some of which have the UNINTERESTING flag and
some of which do not.

Create a method that has an equivalent set of preconditions but uses a
"dense" walk (recursively visits all reachable trees, as long as they
have not previously been marked UNINTERESTING). This is an important
difference from mark_tree_uninteresting(), which short-circuits if the
given tree has the UNINTERESTING flag.

A use of this method will be added in a later change, with a condition
set whether the sparse or dense approach should be used.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Start work on a new 'git survey' command to scan the repository
for monorepo performance and scaling problems.  The goal is to
measure the various known "dimensions of scale" and serve as a
foundation for adding additional measurements as we learn more
about Git monorepo scaling problems.

The initial goal is to complement the scanning and analysis performed
by the GO-based 'git-sizer' (https://github.com/github/git-sizer) tool.
It is hoped that by creating a builtin command, we may be able to take
advantage of internal Git data structures and code that is not
accessible from GO to gain further insight into potential scaling
problems.

Co-authored-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Jeff Hostetler <git@jeffhostetler.com>
Signed-off-by: Derrick Stolee <stolee@gmail.com>
By default we will scan all references in "refs/heads/", "refs/tags/"
and "refs/remotes/".

Add command line opts let the use ask for all refs or a subset of them
and to include a detached HEAD.

Signed-off-by: Jeff Hostetler <git@jeffhostetler.com>
Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
When 'git survey' provides information to the user, this will be presented
in one of two formats: plaintext and JSON. The JSON implementation will be
delayed until the functionality is complete for the plaintext format.

The most important parts of the plaintext format are headers specifying the
different sections of the report and tables providing concreted data.

Create a custom table data structure that allows specifying a list of
strings for the row values. When printing the table, check each column for
the maximum width so we can create a table of the correct size from the
start.

The table structure is designed to be flexible to the different kinds of
output that will be implemented in future changes.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
At the moment, nothing is obvious about the reason for the use of the
path-walk API, but this will become more prevelant in future iterations. For
now, use the path-walk API to sum up the counts of each kind of object.

For example, this is the reachable object summary output for my local repo:

REACHABLE OBJECT SUMMARY
========================
Object Type |  Count
------------+-------
       Tags |   1343
    Commits | 179344
      Trees | 314350
      Blobs | 184030

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Now that we have explored objects by count, we can expand that a bit more to
summarize the data for the on-disk and inflated size of those objects. This
information is helpful for diagnosing both why disk space (and perhaps
clone or fetch times) is growing but also why certain operations are slow
because the inflated size of the abstract objects that must be processed is
so large.

Note: zlib-ng is slightly more efficient even at those small sizes. Even
between zlib versions, there are slight differences in compression. To
accommodate for that in the tests, not the exact numbers but some rough
approximations are validated (the test should validate `git survey`,
after all, not zlib).

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Derrick Stolee <stolee@gmail.com>
In future changes, we will make use of these methods. The intention is to
keep track of the top contributors according to some metric. We don't want
to store all of the entries and do a sort at the end, so track a
constant-size table and remove rows that get pushed out depending on the
chosen sorting algorithm.

Co-authored-by: Jeff Hostetler <git@jeffhostetler.com>
Signed-off-by; Jeff Hostetler <git@jeffhostetler.com>
Signed-off-by: Derrick Stolee <stolee@gmail.com>
Since we are already walking our reachable objects using the path-walk API,
let's now collect lists of the paths that contribute most to different
metrics. Specifically, we care about

 * Number of versions.
 * Total size on disk.
 * Total inflated size (no delta or zlib compression).

This information can be critical to discovering which parts of the
repository are causing the most growth, especially on-disk size. Different
packing strategies might help compress data more efficiently, but the toal
inflated size is a representation of the raw size of all snapshots of those
paths. Even when stored efficiently on disk, that size represents how much
information must be processed to complete a command such as 'git blame'.

The exact disk size seems to be not quite robust enough for testing, as
could be seen by the `linux-musl-meson` job consistently failing, possibly
because of zlib-ng deflates differently: t8100.4(git survey
(default)) was failing with a symptom like this:

   TOTAL OBJECT SIZES BY TYPE
   ===============================================
   Object Type | Count | Disk Size | Inflated Size
   ------------+-------+-----------+--------------
  -    Commits |    10 |      1523 |          2153
  +    Commits |    10 |      1528 |          2153
         Trees |    10 |       495 |          1706
         Blobs |    10 |       191 |           101
  -       Tags |     4 |       510 |           528
  +       Tags |     4 |       547 |           528

This means: the disk size is unlikely something we can verify robustly.
Since zlib-ng seems to increase the disk size of the tags from 528 to
547, we cannot even assume that the disk size is always smaller than the
inflated size. We will most likely want to either skip verifying the
disk size altogether, or go for some kind of fuzzy matching, say, by
replacing `s/ 1[45][0-9][0-9] / ~1.5k /` and `s/ [45][0-9][0-9] / ~½k /`
or something like that.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The 'git survey' builtin provides several detail tables, such as "top
files by on-disk size". The size of these tables defaults to 10,
currently.

Allow the user to specify this number via a new --top=<N> option or the
new survey.top config key.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The winsock2 library provides functions that work on different data
types than file descriptors, therefore we wrap them.

But that is not the only difference: they also do not set `errno` but
expect the callers to enquire about errors via `WSAGetLastError()`.

Let's translate that into appropriate `errno` values whenever the socket
operations fail so that Git's code base does not have to change its
expectations.

This closes #2404

Helped-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
While this command is definitely something we _want_, chances are that
upstreaming this will require substantial changes.

We still want to be able to experiment with this before that, to focus
on what we need out of this command: To assist with diagnosing issues
with large repositories, as well as to help monitoring the growth and
the associated painpoints of such repositories.

To that end, we are about to integrate this command into
`microsoft/git`, to get the tool into the hands of users who need it
most, with the idea to iterate in close collaboration between these
users and the developers familar with Git's internals.

However, we will definitely want to avoid letting anybody have the
impression that this command, its exact inner workings, as well as its
output format, are anywhere close to stable. To make that fact utterly
clear (and thereby protect the freedom to iterate and innovate freely
before upstreaming the command), let's mark its output as experimental
in all-caps, as the first thing we do.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
We map WSAGetLastError() errors to errno errors in winsock_error_to_errno(),
but the MSVC strerror() implementation only produces "Unknown error" for
most of them. Produce some more meaningful error messages in these
cases.

Our builds for ARM64 link against the newer UCRT strerror() that does know
these errors, so we won't change the strerror() used there.

The wording of the messages is copied from glibc strerror() messages.

Reported-by: M Hickford <mirth.hickford@gmail.com>
Signed-off-by: Matthias Aßhauer <mha1993@live.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Although NTLM authentication is considered weak (extending even to
NTLMv2, which purportedly allows brute-forcing reasonably complex
8-character passwords in a matter of days, given ample compute
resources), it _is_ one of the authentication methods supported by
libcurl.

Note: The added test case *cannot* reuse the existing `custom_auth`
facility. The reason is that that facility is backed by an NPH script
("No Parse Headers"), which does not allow handling the 3-phase NTLM
authentication correctly (in my hands, the NPH script would not even be
called upon the Type 3 message, a "200 OK" would be returned, but no
headers, let alone the `git http-backend` output as payload). Having a
separate NTLM authentication script makes the exact workings clearer and
more readable, anyway.

Co-authored-by: Matthew John Cheetham <mjcheetham@outlook.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This comment has been true for the longest time; The combination of the
two preceding commits made it incorrect, so let's drop that comment.

Signed-off-by: Matthias Aßhauer <mha1993@live.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
NTLM authentication is relatively weak. This is the case even with the
default setting of modern Windows versions, where NTLMv1 and LanManager
are disabled and only NTLMv2 is enabled: NTLMv2 hashes of even
reasonably complex 8-character passwords can be broken in a matter of
days, given enough compute resources.

Even worse: On Windows, NTLM authentication uses Security Support
Provider Interface ("SSPI"), which provides the credentials without
requiring the user to type them in.

Which means that an attacker could talk an unsuspecting user into
cloning from a server that is under the attacker's control and extracts
the user's NTLMv2 hash without their knowledge.

For that reason, let's disallow NTLM authentication by default.

NTLM authentication is quite simple to set up, though, and therefore
there are still some on-prem Azure DevOps setups out there whose users
and/or automation rely on this type of authentication. To give them an
escape hatch, introduce the `http.<url>.allowNTLMAuth` config setting
that can be set to `true` to opt back into using NTLM for a specific
remote repository.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Commit 2406bf5 (Win32: detect unix socket support at runtime,
2024-04-03) introduced a runtime detection for whether the operating
system supports unix sockets for Windows, but a mistake snuck into the
tests. When building and testing Git without NO_UNIX_SOCKETS we
currently skip t0301-credential-cache on Windows if unix sockets are
supported and run the tests if they aren't.

Flip that logic to actually work the way it was intended.

Signed-off-by: Matthias Aßhauer <mha1993@live.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The new default of Git is to disable NTLM authentication by default.

To help users find the escape hatch of that config setting, should they
need it, suggest it when the authentication failed and the server had
offered NTLM, i.e. if re-enabling it would fix the problem.

Helped-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In 245670c (credential-cache: check for windows specific errors, 2021-09-14)
we concluded that on Windows we would always encounter ENETDOWN where we
would expect ECONNREFUSED on POSIX systems, when connecting to unix sockets.
As reported in [1], we do encounter ECONNREFUSED on Windows if the
socket file doesn't exist, but the containing directory does and ENETDOWN if
neither exists. We should handle this case like we do on non-windows systems.

[1] #4762 (comment)

This fixes #5314

Helped-by: M Hickford <mirth.hickford@gmail.com>
Signed-off-by: Matthias Aßhauer <mha1993@live.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The reftable library goes out of its way to use its own set of allocator
functions that can be configured using `reftable_set_alloc()`. However,
Git does not configure this.

That is not typically a problem, except when Git uses a custom allocator
via some definitions in `git-compat-util.h`, as is the case in Git for
Windows (which switched away from the long-unmaintained nedmalloc to
mimalloc).

Then, it is quite possible that Git assigns a `strbuf` (allocated via
the custom allocator) to, say, the `refname` field of a
`reftable_log_record` in `write_transaction_table()`, and later on asks
the reftable library function `reftable_log_record_release()` to release
it, but that function was compiled without using `git-compat-util.h` and
hence calls regular `free()` (i.e. _not_ the custom allocator's own
function).

This has been a problem for a long time and it was a matter of some sort
of "luck" that 1) reftables are not commonly used on Windows, and 2)
mimalloc can often ignore gracefully when it is asked to release memory
that it has not allocated.

However, a recent update to `seen` brought this problem to the
forefront, letting t1460 fail in Git for Windows, with symptoms much in
the same way as the problem I had to address in d02c37c
(t-reftable-basics: allow for `malloc` to be `#define`d, 2025-01-08)
where exit code 127 was also produced in lieu of
`STATUS_HEAP_CORRUPTION` (C0000374) because exit codes are only 7 bits
wide.

It was not possible to figure out what change in particular caused these
new failures within a reasonable time frame, as there are too many
changes in `seen` that conflict with Git for Windows' patches, I had to
stop the investigation after spending four hours on it fruitlessly.

To verify that this patch fixes the issue, I avoided using mimalloc and
temporarily patched in a "custom allocator" that would more reliably
point out problems, like this:

  diff --git a/refs/reftable-backend.c b/refs/reftable-backend.c
  index 68f3829..9421d630b9f5 100644
  --- a/refs/reftable-backend.c
  +++ b/refs/reftable-backend.c
  @@ -353,6 +353,69 @@ static int reftable_be_fsync(int fd)
   	return fsync_component(FSYNC_COMPONENT_REFERENCE, fd);
   }

  +#define DEBUG_REFTABLE_ALLOC
  +#ifdef DEBUG_REFTABLE_ALLOC
  +#include "khash.h"
  +
  +static inline khint_t __ac_X31_hash_ptr(void *ptr)
  +{
  +	union {
  +		void *ptr;
  +		char s[sizeof(void *)];
  +	} u;
  +	size_t i;
  +	khint_t h;
  +
  +	u.ptr = ptr;
  +	h = (khint_t)*u.s;
  +	for (i = 0; i < sizeof(void *); i++)
  +		h = (h << 5) - h + (khint_t)u.s[i];
  +	return h;
  +}
  +
  +#define kh_ptr_hash_func(key) __ac_X31_hash_ptr(key)
  +#define kh_ptr_hash_equal(a, b) ((a) == (b))
  +
  +KHASH_INIT(ptr, void *, int, 0, kh_ptr_hash_func, kh_ptr_hash_equal)
  +
  +static kh_ptr_t *my_malloced;
  +
  +static void *my_malloc(size_t sz)
  +{
  +	int dummy;
  +	void *ptr = malloc(sz);
  +	if (ptr)
  +		kh_put_ptr(my_malloced, ptr, &dummy);
  +	return ptr;
  +}
  +
  +static void *my_realloc(void *ptr, size_t sz)
  +{
  +	int dummy;
  +	if (ptr) {
  +		khiter_t pos = kh_get_ptr(my_malloced, ptr);
  +		if (pos >= kh_end(my_malloced))
  +			die("Was not my_malloc()ed: %p", ptr);
  +		kh_del_ptr(my_malloced, pos);
  +	}
  +	ptr = realloc(ptr, sz);
  +	if (ptr)
  +		kh_put_ptr(my_malloced, ptr, &dummy);
  +	return ptr;
  +}
  +
  +static void my_free(void *ptr)
  +{
  +	if (ptr) {
  +		khiter_t pos = kh_get_ptr(my_malloced, ptr);
  +		if (pos >= kh_end(my_malloced))
  +			die("Was not my_malloc()ed: %p", ptr);
  +		kh_del_ptr(my_malloced, pos);
  +	}
  +	free(ptr);
  +}
  +#endif
  +
   static struct ref_store *reftable_be_init(struct repository *repo,
   					  const char *gitdir,
   					  unsigned int store_flags)
  @@ -362,6 +425,11 @@ static struct ref_store *reftable_be_init(struct repository *repo,
   	int is_worktree;
   	mode_t mask;

  +#ifdef DEBUG_REFTABLE_ALLOC
  +	my_malloced = kh_init_ptr();
  +	reftable_set_alloc(my_malloc, my_realloc, my_free);
  +#endif
  +
   	mask = umask(0);
   	umask(mask);

I briefly considered contributing this "custom allocator" patch, too,
but it is unwieldy (for example, it would not work at all when compiling
with mimalloc support) and it would only waste space (or even time, if a
compile flag was introduced and exercised as part of the CI builds).
Given that it is highly unlikely that Git will lose the new
`reftable_set_alloc()` call by mistake, I rejected that idea as simply
too wasteful.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Every once in a while, whitespace errors are introduced in Git for
Windows' rebases to newer Git versions, simply by virtue of integrating
upstream commits that do not follow upstream Git's own whitespace rule.
In Git v2.50.0-rc0, for example, 03f2915 (xdiff: disable
cleanup_records heuristic with --minimal, 2025-04-29) introduced a
trailing space.

Arguably, non-actionable alerts are worse than no alerts at all, so
let's suppress those alerts that we cannot do anything about, anyway.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The 2.53.0.rc0.windows release candidate had a regression where
writing to stderr from a pre-push hook would error out.

The regression was fixed in 2.53.0.rc1.windows and the test here ensures
that this stays fixed.

Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de>
The previous commits disabled NTLM authentication by default due to its
cryptographic weaknesses. Users can re-enable it via the config setting
http.<url>.allowNTLMAuth, but this requires manual intervention.

Credential helpers may have knowledge about which servers are trusted
for NTLM authentication (e.g., known on-prem Azure DevOps instances).
To allow them to signal this trust, introduce a simple negotiation:
when NTLM is suppressed and the server offered it, Git advertises
ntlm=suppressed to the credential helper. The helper can respond with
ntlm=allow to re-enable NTLM for this request.

This happens precisely at the point where we would otherwise warn the
user about NTLM being suppressed, ensuring the capability is only
advertised when relevant.

Helped-by: Matthew John Cheetham <mjcheetham@outlook.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The `git_terminal_prompt()` function expects the terminal window to be
attached to a Win32 Console. However, this is not the case with terminal
windows other than `cmd.exe`'s, e.g. with MSys2's own `mintty`.

Non-cmd terminals such as `mintty` still have to have a Win32 Console
to be proper console programs, but have to hide the Win32 Console to
be able to provide more flexibility (such as being resizeable not only
vertically but also horizontally). By writing to that Win32 Console,
`git_terminal_prompt()` manages only to send the prompt to nowhere and
to wait for input from a Console to which the user has no access.

This commit introduces a function specifically to support `mintty` -- or
other terminals that are compatible with MSys2's `/dev/tty` emulation. We
use the `TERM` environment variable as an indicator for that: if the value
starts with "xterm" (such as `mintty`'s "xterm_256color"), we prefer to
let `xterm_prompt()` handle the user interaction.

The most prominent user of `git_terminal_prompt()` is certainly
`git-remote-https.exe`. It is an interesting use case because both
`stdin` and `stdout` are redirected when Git calls said executable, yet
it still wants to access the terminal.

When running inside a `mintty`, the terminal is not accessible to the
`git-remote-https.exe` program, though, because it is a MinGW program
and the `mintty` terminal is not backed by a Win32 console.

To solve that problem, we simply call out to the shell -- which is an
*MSys2* program and can therefore access `/dev/tty`.

Helped-by: nalla <nalla@hamal.uberspace.de>
Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Accessing the Windows console through the special CONIN$ / CONOUT$ devices
doesn't work properly for non-ASCII usernames an passwords.

It also doesn't work for terminal emulators that hide the native console
window (such as mintty), and 'TERM=xterm*' is not necessarily a reliable
indicator for such terminals.

The new shell_prompt() function, on the other hand, works fine for both
MSys1 and MSys2, in native console windows as well as mintty, and properly
supports Unicode. It just needs bash on the path (for 'read -s', which is
bash-specific).

On Windows, try to use the shell to read from the terminal. If that fails
with ENOENT (i.e. bash was not found), use CONIN/OUT as fallback.

Note: To test this, create a UTF-8 credential file with non-ASCII chars,
e.g. in git-bash: 'echo url=http://täst.com > cred.txt'. Then in git-cmd,
'git credential fill <cred.txt' works (shell version), while calling git
without the git-wrapper (i.e. 'mingw64\bin\git credential fill <cred.txt')
mangles non-ASCII chars in both console output and input.

Signed-off-by: Karsten Blees <blees@dcon.de>
dscho and others added 22 commits June 29, 2026 19:07
…ITOR"

In e3f7e01 (Revert "editor: save and reset terminal after calling
EDITOR", 2021-11-22), we reverted the commit wholesale where the
terminal state would be saved and restored before/after calling an
editor.

The reverted commit was intended to fix a problem with Windows Terminal
where simply calling `vi` would cause problems afterwards.

To fix the problem addressed by the revert, but _still_ keep the problem
with Windows Terminal fixed, let's revert the revert, with a twist: we
restrict the save/restore _specifically_ to the case where `vi` (or
`vim`) is called, and do not do the same for any other editor.

This should still catch the majority of the cases, and will bridge the
time until the original patch is re-done in a way that addresses all
concerns.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The `--stdin` option was a well-established paradigm in other commands,
therefore we implemented it in `git reset` for use by Visual Studio.

Unfortunately, upstream Git decided that it is time to introduce
`--pathspec-from-file` instead.

To keep backwards-compatibility for some grace period, we therefore
reinstate the `--stdin` option on top of the `--pathspec-from-file`
option, but mark it firmly as deprecated.

Helped-by: Victoria Dye <vdye@github.com>
Helped-by: Matthew John Cheetham <mjcheetham@outlook.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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>
In this time and age, AI is everywhere. However, it's sometimes not very
easy to use. For green-field projects it works quite a bit better than
for existing legacy projects. And Git's source code is _quite_ as legacy
code as they come... 😁

Now, the only way how AI can be used efficiently with legacy code
is by providing enough information by way of prompt context for the
AI to have a chance to make any sense of the code. The structure and
the architecture is, after all, not designed for AI, but rather the
opposite: By virtue of having grown organically over two decades, there
is no design that AI coding models would readily grasp.

So here is a document that describes all kinds of aspects about this
project. The idea is to help AI by providing information that it does
not have ingrained in its weights. The idea is to provide information
that a human prompter might take for granted, but no coding model will
have been trained on specifically.

Assisted-by: Claude Opus 4.5
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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>
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>
Includes touch-ups by 마누엘, Philip Oakley and 孙卓识.

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>
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>
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>
Git for Windows accepts pull requests; Core Git does not. Therefore we
need to adjust the template (because it only matches core Git's
project management style, not ours).

Also: direct Git for Windows enhancements to their contributions page,
space out the text for easy reading, and clarify that the mailing list
is plain text, not HTML.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This 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>
These are Git for Windows' Git GUI and gitk patches. We will have to
decide at some point what to do about them, but that's a little lower
priority (as Git GUI seems to be unmaintained for the time being, and
the gitk maintainer keeps a very low profile on the Git mailing list,
too).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Upstream Git does not test their tags with the expensive set of tests,
so a couple of them seem quite broken for now, even so much as hanging
indefinitely.

It is outside of the responsibility of the Git for Windows project to
fix upstream's own tests for platforms other than Windows, so let's not
exercise them.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
A fix for calling `vim` in Windows Terminal caused a regression and was
reverted. We partially un-revert this, to get the fix again.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This topic branch re-adds the deprecated --stdin/-z options to `git
reset`. Those patches were overridden by a different set of options in
the upstream Git project before we could propose `--stdin`.

We offered this in MinGit to applications that wanted a safer way to
pass lots of pathspecs to Git, and these applications will need to be
adjusted.

Instead of `--stdin`, `--pathspec-from-file=-` should be used, and
instead of `-z`, `--pathspec-file-nul`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Originally introduced as `core.useBuiltinFSMonitor` in Git for Windows
and developed, improved and stabilized there, the built-in FSMonitor
only made it into upstream Git (after unnecessarily long hemming and
hawing and throwing overly perfectionist style review sticks into the
spokes) as `core.fsmonitor = true`.

In Git for Windows, with this topic branch, we re-introduce the
now-obsolete config setting, with warnings suggesting to existing users
how to switch to the new config setting, with the intention to
ultimately drop the patch at some stage.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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>
@dscho dscho added this to the v2.55.0 milestone Jun 29, 2026
@dscho dscho self-assigned this Jun 29, 2026
@dscho

dscho commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

/git-artifacts

The tag-git workflow run was started

@gitforwindowshelper

Copy link
Copy Markdown

Validate the installer manually

The installer was built successfully;
Please download, install, and run through the pre-flight check-list.
@dscho ☝️

@dscho

dscho commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

/release

The release-git workflow run was started

@gitforwindowshelper

Copy link
Copy Markdown

@dscho, please Share on Bluesky and send the announcement email.

Please wait for the repository-updates job to finish, then open the MSYS2 sync PR.

@gitforwindowshelper
gitforwindowshelper Bot merged commit bf5afde into main Jun 29, 2026
101 checks passed
@gitforwindowshelper
gitforwindowshelper Bot deleted the rebase-to-v2.55.0 branch June 29, 2026 18:28
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.

[New git version] v2.55.0