Skip to content

Rebase to Git v2.56.0 - #6443

Merged
dscho merged 345 commits into
git-for-windows:mainfrom
dscho:rebase-to-v2.56.0
Sep 28, 2026
Merged

dscho merged 345 commits into
git-for-windows:mainfrom
dscho:rebase-to-v2.56.0

Conversation

@dscho

@dscho dscho commented Sep 28, 2026 •

Copy link
Copy Markdown
Member
Range-diff relative to main
  • 2: a73e1c1 = 1: 3c3ce82 unix-socket: avoid leak when initialization fails

  • 3: 89b36b4 = 2: dff9ccc grep: prevent ^$ false match at end of file

  • 5: 9937e15 = 3: 38068e6 ci(vs-build): adapt to Visual Studio 2026 default on windows-latest

  • 6: b0907ff = 4: 04f9209 vcpkg_install: detect lack of Git

  • 7: 4b66d1e = 5: 83a7c5b vcpkg_install: add comment regarding slow network connections

  • 8: 4907c51 = 6: 5ac97e2 vcbuild: install ARM64 dependencies when building ARM64 binaries

  • 9: a09a887 = 7: f99f626 vcbuild: add an option to install individual 'features'

  • 10: 3af5700 = 8: 96e57e5 cmake: allow building for Windows/ARM64

  • 11: 0adc558 = 9: 918b0dc t9350: point out that refs are not updated correctly

  • 12: e2da5dd = 10: 31138ae ci(vs-build) also build Windows/ARM64 artifacts

  • 13: 1cc4970 = 11: b22f015 transport-helper: add trailing --

  • 14: 7c1b374 = 12: 3d63813 mingw: demonstrate a git add issue with NTFS junctions

  • 15: 971600e = 13: e878136 t5505/t5516: allow running without .git/branches/ in the templates

  • 16: 7e8f7e3 = 14: 9d7c88a vcbuild: stop hard-coding OpenSSL as a dependency

  • 4: 45c1cb5 = 15: b797b89 ci: bump actions/checkout from 6 to 7

  • 17: 7931f66 = 16: 206cff3 remote-helper: check helper status after import/export

  • 18: 0c7d60f = 17: fc177db strbuf_realpath(): use platform-dependent API if available

  • 19: f5d1d9a = 18: 1bb7c82 http: use new "best effort" strategy for Secure Channel revoke checking

  • 20: 64b38da = 19: 017c05b t5505/t5516: fix white-space around redirectors

  • 21: d9c031c = 20: 3a786b7 cmake(): allow setting HOST_CPU for cross-compilation

  • 148: a88fef0 = 21: 40b7c8a bundle-uri: refuse advertised URIs by protocol

  • 152: c117a50 = 22: bb304b1 ci(coverity): bump actions/cache from 5 to 6

  • 22: 1852246 = 23: e654576 Always auto-gc after calling a fast-import transport

  • 23: 15cf248 = 24: ac0dc06 mingw: prevent regressions with "drive-less" absolute paths

  • 24: 8d7620f = 25: 484bcff transport: optionally disable side-band-64k

  • 25: 2c66260 = 26: 4e1e01e mingw: fix fatal error working on mapped network drives on Windows

  • 26: 887624f = 27: c2da1e5 clink.pl: fix MSVC compile script to handle libcurl-d.lib

  • 27: c37602f = 28: 79bc9ce mingw: implement a platform-specific strbuf_realpath()

  • 28: bbdd884 = 29: d453996 t3701: verify that we can add lots of files interactively

  • 29: 25e2373 = 30: 143d2ff commit: accept "scissors" with CR/LF line endings

  • 30: 7e16843 = 31: 609693c t0014: fix indentation

  • 31: d193441 = 32: 0b5719d git-gui: accommodate for intent-to-add files

  • 32: cc043cd = 33: 5bc4d0f mingw: allow for longer paths in parse_interpreter()

  • 33: dbdd754 = 34: bdc5af8 compat/vcbuild: document preferred way to build in Visual Studio

  • 34: 80fffae = 35: 046ba5f http: optionally send SSL client certificate

  • 35: 29d10ba = 36: 1ab4500 revision: create mark_trees_uninteresting_dense()

  • 36: 449129f = 37: 1db72dc survey: stub in new experimental 'git-survey' command

  • 40: eafa7f2 = 38: 6c42df1 max_tree_depth: lower it for clang builds in general on Windows

  • 37: 41efe39 = 39: 1955622 survey: add command line opts to select references

  • 42: 0400e01 = 40: 96ce121 mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory

  • 38: 9879d43 = 41: 3d41022 survey: start pretty printing data in table form

  • 39: 08058a8 = 42: 95022f0 survey: add object count summary

  • 45: 4b4c054 = 43: 46627ed clink.pl: fix libexpatd.lib link error when using MSVC

  • 41: 42666ba = 44: 1fe1b8b survey: summarize total sizes by object type

  • 47: dae9865 = 45: 36640f3 Makefile: clean up .ilk files when MSVC=1

  • 43: a20a707 = 46: 3042869 survey: show progress during object walk

  • 49: 2f0cedd = 47: 47a54d9 vcbuild: add support for compiling Windows resource files

  • 44: 268f299 = 48: 2578677 survey: add ability to track prioritized lists

  • 51: c19160e = 49: 641543b config.mak.uname: add git.rc to MSVC builds

  • 52: f19ea3e = 50: 7d688a6 MinGW: link as terminal server aware

  • 46: 1c567c7 = 51: 754603f survey: add report of "largest" paths

  • 54: 79f6f5b = 52: 3e4f533 CMake: default Visual Studio generator has changed

  • 55: d8eeeb7 = 53: 46c831b clink.pl: ignore no-stack-protector arg on MSVC=1 builds

  • 56: 00ac3cf = 54: 8f4471e http: optionally load libcurl lazily

  • 48: 3d2c6a5 = 55: a1def63 survey: add --top= option and config

  • 58: 54c9240 = 56: 3a85713 .gitignore: add Visual Studio CMakeSetting.json file

  • 59: 12082b6 = 57: 75953cc clink.pl: move default linker options for MSVC=1 builds

  • 60: 59f30b4 = 58: d22b961 http: support lazy-loading libcurl also on Windows

  • 50: fa3f2b3 = 59: d6a3407 survey: clearly note the experimental nature in the output

  • 62: 7cab29d = 60: 593aae7 subtree: update contrib/subtree test target

  • 63: 673eee7 = 61: 2bd5d62 CMakeLists: add default "x64-windows" arch for Visual Studio

  • 64: 8e9d9b1 = 62: 92803c6 setup: properly use "%(prefix)/" when in WSL

  • 65: ac21711 = 63: 3ee2ed2 Add config option windows.appendAtomically

  • 66: 1b40277 = 64: 75c2ed5 cmake: install headless-git.

  • 67: 51df1cb = 65: 3ad122d http: when loading libcurl lazily, allow for multiple SSL backends

  • 53: b285614 = 66: c4e0b80 repo: split annotated tags out from total tag count in structure

  • 69: 602d379 = 67: c51a6fd ci: run contrib/subtree tests in CI builds

  • 70: ec2d27c = 68: dc1f98a CMake: show Win32 and Generator_platform build-option values

  • 71: ca64a50 = 69: 136254e compat/mingw.c: do not warn when failing to get owner

  • 72: 274d843 = 70: 43aeff0 mingw: $env:TERM="xterm-256color" for newer OSes

  • 73: 85715ca = 71: 6dc31b7 winansi: check result and Buffer before using Name

  • 74: fe6281d = 72: ed7b77b mingw: change core.fsyncObjectFiles = 1 by default

  • 75: 5968f6f = 73: 77036ec Fix Windows version resources

  • 76: a59b224 = 74: 3b7acd4 status: fix for old-style submodules with commondir

  • 77: b6d4110 = 75: 4d0e492 git.rc: include winuser.h

  • 78: 3910656 = 76: c10690e mingw: do load libcurl dynamically by default

  • 79: 5bb4571 = 77: 146cb0b Add a GitHub workflow to verify that Git/Scalar work in Nano Server

  • 80: 472a2e9 = 78: 5470cbc mingw: suggest windows.appendAtomically in more cases

  • 81: f5d88e8 = 79: ae48d95 win32: use native ANSI sequence processing, if possible

  • 82: 9f1e598 = 80: 071d564 common-main.c: fflush stdout buffer upon exit

  • 83: 8311b2a = 81: 44da6d7 t5601/t7406(mingw): do run tests with symlink support

  • 84: de1220f = 82: 5a075cb Fallback to AppData if XDG_CONFIG_HOME is unset

  • 85: 044da41 = 83: beb6012 mingw: Support git_terminal_prompt with more terminals

  • 86: cd8b1cd = 84: 78484fe compat/terminal.c: only use the Windows console if bash 'read -r' fails

  • 87: d7e9f93 = 85: 03c5a21 mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method

  • 57: 097e00c = 86: 0cd8584 repo: filter the structure scope via --ref-filter=

  • 88: 9b88fc0 = 87: ceb9bac Win32: symlink: move phantom symlink creation to a separate function

  • 102: 313944e = 88: 27337dd diff: stop truncating the deflated-binary-diff size on Windows

  • 61: 5ef1ddb = 89: 5f4cbe8 repo: report top-N paths by count, disk, and inflated size in structure

  • 89: 23153f2 = 90: 1f37fd2 mingw: make sure errno is set correctly when socket operations fail

  • 90: 7bc4539 = 91: ed29780 t5563: verify that NTLM authentication works

  • 91: d3b36b6 = 92: b5e4c5f mingw: introduce code to detect whether we're inside a Windows container

  • 92: 2cd4411 = 93: 1b0e62f Introduce helper to create symlinks that knows about index_state

  • 108: be3cb5b = 94: f123d3d convert: widen gather_convert_stats() helpers to size_t

  • 68: 2525495 = 95: bd5637f t1901: cover the --top option of git repo structure

  • 93: c24ffdb = 96: c5bc0d4 compat/mingw: handle WSA errors in strerror

  • 94: 20f786f = 97: 4ff3b12 http: disallow NTLM authentication by default

  • 95: b39ed59 = 98: 758df87 mingw: when running in a Windows container, try to rename() harder

  • 96: eeb433a = 99: 80813d5 mingw: allow to specify the symlink type in .gitattributes

  • 124: 27ae74f = 100: 14fe6d7 read-cache: stop truncating index blob sizes on Windows

  • 97: 723dbfc = 101: 3a9a9f8 repo: read the --top default from repo.structure.top

  • 98: ca42679 = 102: 1dcd283 compat/mingw: drop outdated comment

  • 99: 33f90b6 = 103: 0e76203 http: warn if might have failed because of NTLM

  • 100: 7cc77ef = 104: 9449cc8 mingw: move the file_attr_to_st_mode() function definition

  • 101: b843919 = 105: 9853de1 Win32: symlink: add test for symlink attribute

  • 125: c25b61b = 106: 8b6ef9b xdiff-interface: widen buffer_is_binary() size parameter to size_t

  • 103: bade7fe = 107: 38ebd74 git-survey: announce the upcoming pivot into git repo structure

  • 104: f8867c8 = 108: 60bde05 t0301: actually test credential-cache on Windows

  • 105: 7ffa37e = 109: 339bd4e credential: advertise NTLM suppression and allow helpers to re-enable

  • 106: 9399428 = 110: 3578b5c mingw: Windows Docker volumes are not symbolic links

  • 107: 0ea6ccc = 111: a4d9b74 clean: do not traverse mount points

  • 127: 3509e65 = 112: 4901bd7 combine-diff: stop truncating combined-diff blob sizes on Windows

  • 109: de05fff = 113: 4d2c654 pack-bitmap: stop truncating blob sizes used by --filter=blob:limit

  • 110: 72db98d = 114: eac899e survey: turn into a thin shim over git repo structure

  • 111: fe249c6 = 115: b0d39f3 credential-cache: handle ECONNREFUSED gracefully

  • 112: 1999ee3 = 116: 91071a2 reftable: do make sure to use custom allocators

  • 113: 1f80dc2 = 117: 355c62d check-whitespace: avoid alerts about upstream commits

  • 114: ea0f1ea = 118: 0ceea94 t/t5571-prep-push-hook.sh: Add test with writing to stderr

  • 115: 29e08e0 = 119: 8065242 dir: do not traverse mount points

  • 116: 441a7db = 120: 2107042 win32: thread-utils: handle multi-socket systems

  • 117: 50ecacd = 121: fcd7636 t5563: add tests for http.emptyAuth with Negotiate

  • 118: fd5685c = 122: 373d334 entry: flush fscache after creating directories and writing files

  • 119: 15bf413 = 123: 94582b3 ci(macos): skip the git p4 tests

  • 120: 45f5357 = 124: 847ea63 mingw: work around rename() failing on a read-only file

  • 121: d730f18 = 125: 3978bca clean: remove mount points when possible

  • 122: 3ac681b = 126: df36504 mingw: optionally enable wsl compability file mode bits

  • 123: a562b12 = 127: f9871cb Refuse to follow invalid paths in .git files

  • 126: 58d8220 = 128: 9dc71f7 tree-walk: drop link_len cast in get_tree_entry_follow_symlinks()

  • 128: 60d0d57 = 129: 08eaa17 tree-walk: widen init_tree_desc() and init_tree_desc_gently() to size_t

  • 129: 4e61a46 = 130: 67b5dd7 diff: widen textconv_object() size out-param to size_t

  • 130: 88cb329 = 131: 175bcce pack-objects: drop the two tree-walk casts in the preferred-base path

  • 131: 65e6e52 = 132: 9473dfe diffcore: widen struct diff_filespec.size to size_t

  • 132: 5214aed = 133: f026774 tree: widen struct tree.size and parse_tree_buffer() to size_t

  • 133: b579c51 = 134: c902319 commit: widen the commit-buffer API to size_t

  • 134: d71fec1 = 135: 85084ea blame: widen find_line_starts() len parameter to size_t

  • 135: e553556 = 136: edfa7e1 grep: widen struct grep_source.size and grep_buffer() to size_t

  • 136: fbe1028 = 137: 756e4f5 fast-export: drop the export_blob() size cast and widen anonymize_blob()

  • 137: 539b860 = 138: 512e60e repo: drop the inflated-size cast in count_objects()

  • 138: 4a2e6c8 = 139: ad10cd7 unpack-objects: widen the size-passing infrastructure to size_t

  • 139: 2b7de9d = 140: e1d2644 pack-objects: drop cast_size_t_to_ulong shims in get_delta()

  • 140: 0163ad2 = 141: ee2e8d7 pack-objects: drop cast_size_t_to_ulong shims in try_delta()

  • 141: d1d3953 = 142: 7b2fb9e pack-objects: drop the last size shim in write_no_reuse_object()

  • 142: 038ea25 = 143: 45f465b blame: widen struct blame_scoreboard.final_buf_size to size_t

  • 143: 1f68ecd = 144: 8e9a0d4 fast-import: drop the six size casts in the object-read paths

  • 144: 926d9b9 = 145: 791e1ad t/helper/test-pack-deltas: drop the delta_size cast in write_ref_delta()

  • 145: 6624c24 = 146: 2af2f15 Drop the cast_size_t_to_ulong() helper

  • 146: 8289f17 = 147: fecdd9f mingw: handle staging 4GB+ files correctly

  • 147: 894720f = 148: 267ee30 mingw: support unpacking loose 4GB+ objects

  • 1: b08c11b = 149: 0fbd58c difftool: do not crash on a path rejected by verify_path()

  • 149: 5152ad5 = 150: d92a525 t: add an expensive test to verify that 4GB+ blobs can be staged/read

  • 227: 19063be = 151: 2a4d52f difftool: avoid memory leak when run_dir_diff() fails

  • 150: 6c20199 = 152: 9ba8c50 object-file: use size_t for object size in check_object_signature()

  • 151: fde0edc = 153: 5be054f coverity: skip building with Rust, for now

  • -: ----------- > 154: d21070d difftool: avoid invalid memory access by an atexit handler

  • 153: 95fab75 = 155: 3ed9e12 Win32: make FILETIME conversion functions public

  • 154: a27940a = 156: 601b270 Win32: dirent.c: Move opendir down

  • 155: 304831d = 157: 83b612e mingw: make the dirent implementation pluggable

  • 156: 901f5e5 = 158: 46b1208 Win32: make the lstat implementation pluggable

  • 157: 2874977 = 159: 28c57dd mingw: add infrastructure for read-only file system level caches

  • 158: 9f8bdf8 = 160: b1fe55e mingw: add a cache below mingw's lstat and dirent implementations

  • 159: 7b99a25 = 161: 33adcb5 fscache: load directories only once

  • 160: d4a7669 = 162: 3ab6e32 fscache: add key for GIT_TRACE_FSCACHE

  • 161: 3fa0981 = 163: 6083c94 fscache: remember not-found directories

  • 188: 976d316 = 164: b7a805c git-gui--askyesno: fix funny text wrapping

  • 162: 4e3e6c9 = 165: ac3c777 fscache: add a test for the dir-not-found optimization

  • 190: c2fb3f1 = 166: a85e947 git-gui--askyesno (mingw): use Git for Windows' icon, if available

  • 163: 8e337d5 = 167: 7150ee0 add: use preload-index and fscache for performance

  • 164: 1d63485 = 168: 08bf12b dir.c: make add_excludes aware of fscache during status

  • 165: 20b158c = 169: ab872d7 fscache: make fscache_enabled() public

  • 166: 2b4648d = 170: 1b91abe dir.c: regression fix for add_excludes with fscache

  • 167: a0665c0 = 171: fba1a2c fetch-pack.c: enable fscache for stats under .git/objects

  • 168: 6d4d8b9 = 172: 6b4047f checkout.c: enable fscache for checkout again

  • 169: d008930 = 173: 15d9702 Enable the filesystem cache (fscache) in refresh_index().

  • 170: c59111e = 174: 009a927 fscache: use FindFirstFileExW to avoid retrieving the short name

  • 171: 8d9ee24 = 175: bedf576 fscache: add GIT_TEST_FSCACHE support

  • 172: 108ea41 = 176: 707933c fscache: add fscache hit statistics

  • 173: 14c4147 = 177: 2102373 unpack-trees: enable fscache for sparse-checkout

  • 174: 9770ce3 = 178: 871a056 status: disable and free fscache at the end of the status command

  • 175: 45082e0 = 179: 6d8fad1 mem_pool: add GIT_TRACE_MEMPOOL support

  • 176: 99f5488 = 180: 618d3ad fscache: fscache takes an initial size

  • 177: 3c9f0d2 = 181: b0f6344 fscache: update fscache to be thread specific instead of global

  • 178: 6ca4f70 = 182: 33d244c fscache: teach fscache to use mempool

  • 179: 381273b = 183: 2ddd3a1 fscache: make fscache_enable() thread safe

  • 180: 4485beb = 184: edc9967 fscache: teach fscache to use NtQueryDirectoryFile

  • 181: 9f4f94f = 185: 60b729c fscache: remember the reparse tag for each entry

  • 182: 3fc3da7 = 186: 68d3576 fscache: Windows Docker volumes are not symbolic links

  • 183: 6cd6b7e = 187: e097ae3 fscache: optionally enable wsl compability file mode bits

  • 184: ac4e576 = 188: b90454a fscache: implement an FSCache-aware is_mount_point()

  • 185: 9245fdb = 189: 9f376c2 clean: make use of FSCache

  • 186: b5ebc87 = 190: cf53679 compat/poll: do not collect more handles than the wait supports

  • 187: f2d8b80 = 191: d7b8fab parallel-checkout: limit worker count to what poll() can wait on

  • 189: 31aa5a0 = 192: dff4912 run-command: limit concurrent children to what poll() can wait on

  • 191: 26eee36 = 193: 534000e pack-objects (mingw): demonstrate a segmentation fault with large deltas

  • 192: 939b27d = 194: b0d7481 mingw: support long paths

  • 193: 81d8125 = 195: e891acf win32(long path support): leave drive-less absolute paths intact

  • 194: ff34f17 = 196: 563f99e compat/fsmonitor/fsm-*-win32: support long paths

  • 195: 3c843a7 = 197: c8ae375 clean: suggest using core.longPaths if paths are too long to remove

  • 196: 9bf1cbc = 198: 8dda5fd mingw: explicitly specify with which cmd to prefix the cmdline

  • 197: 1540174 = 199: 8408feb mingw: when path_lookup() failed, try BusyBox

  • 198: 6cfcd53 = 200: b7d95f3 test-tool: learn to act as a drop-in replacement for iconv

  • 199: 83c7552 = 201: f3c24a8 tests(mingw): if iconv is unavailable, use test-helper --iconv

  • 200: e74af57 = 202: a3b3d39 gitattributes: mark .png files as binary

  • 201: 3f7a5b2 = 203: fa182b9 tests: move test PNGs into t/lib-diff/

  • 202: c7d121d = 204: 2e14143 tests: only override sort & find if there are usable ones in /usr/bin/

  • 203: 646dc04 = 205: 094ba33 tests: use the correct path separator with BusyBox

  • 204: 1f408d8 = 206: 75574ba mingw: only use Bash-ism builtin pwd -W when available

  • 205: 359d0f4 = 207: 8de4a8f tests (mingw): remove Bash-specific pwd option

  • 206: 12dd122 = 208: b90e227 test-lib: add BUSYBOX prerequisite

  • 207: be0fd61 = 209: d046b71 t5003: use binary file from t/lib-diff/

  • 208: 13189fc = 210: bc27abb t5532: workaround for BusyBox on Windows

  • 209: 6d5e629 = 211: d37a447 t5605: special-case hardlink test for BusyBox-w32

  • 210: 33fd268 = 212: 149bef9 t5813: allow for $PWD to be a Windows path

  • 211: 7155f3b = 213: be43eb6 t9200: skip tests when $PWD contains a colon

  • 212: 2044525 = 214: 4fbde9a Describe Git for Windows' architecture

  • 213: f418bf5 = 215: 3bbe966 Add an AGENTS.md file to help with AI-assisted debugging/development

  • 214: 5006edd = 216: 010f14f Modify the Code of Conduct for Git for Windows

  • 215: 33d9196 ! 217: db61eb7 CONTRIBUTING.md: add guide for first-time contributors

    @@ CONTRIBUTING.md (new)
     +  `git branch --edit-description`, you will end up with a 0/N mail with that description and
     +  a nice overall diffstat.
     +* `--in-reply-to=[Message-ID]`: This will mark your cover letter as replying to the given
    -+  message (which should correspond to your previous iteration). To determine the correct Message-ID,
    ++  message (which should correspond to your first iteration). To determine the correct Message-ID,
     +  find the message you are replying to on [public-inbox.org/git](https://public-inbox.org/git) and take
     +  the ID from between the angle brackets.
     +
    @@ CONTRIBUTING.md (new)
     +
     +```
     +git send-email --to=git@vger.kernel.org --cc=<email1> --cc=<email2> \
    -+    --in-reply-to=<the message id of cover letter of patch v2> [dir with patches]/*.patch
    ++    --in-reply-to=<the message id of cover letter of patch v1> [dir with patches]/*.patch
     +```
  • 216: 11eacac = 218: 764637d README.md: Add a Windows-specific preamble

  • 221: df6405c = 219: dc3c3b8 Partially un-revert "editor: save and reset terminal after calling EDITOR"

  • 217: 6c865a2 = 220: 31a70d7 Add an issue template

  • 222: aff1770 = 221: 68bd30e reset: reinstate support for the deprecated --stdin option

  • 218: 650d98e = 222: 750b949 Modify the GitHub Pull Request template (to reflect Git for Windows)

  • 219: a3859a9 = 223: e1bea56 Add a GitHub workflow to monitor component updates

  • 223: 6a49079 = 224: d354087 fsmonitor: reintroduce core.useBuiltinFSMonitor

  • 220: 9fd2001 = 225: 27c7158 SECURITY.md: document Git for Windows' policies

  • 224: 8a605f2 = 226: e031d02 dependabot: help keeping GitHub Actions versions up to date

  • 225: ff60bb8 = 227: 4c0fc26 ci: only run the expensive tests in the Windows tests for now

  • 226: aef938a < -: ----------- fixup! CONTRIBUTING.md: add guide for first-time contributors

dscho and others added 30 commits September 28, 2026 18:33
…ctory

Internally, Git expects the environment variable `HOME` to be set, and
to point to the current user's home directory.

This environment variable is not set by default on Windows, and
therefore Git tries its best to construct one if it finds `HOME` unset.

There are actually two different approaches Git tries: first, it looks
at `HOMEDRIVE`/`HOMEPATH` because this is widely used in corporate
environments with roaming profiles, and a user generally wants their
global Git settings to be in a roaming profile.

Only when `HOMEDRIVE`/`HOMEPATH` is either unset or does not point to a
valid location, Git will fall back to using `USERPROFILE` instead.

However, starting with Windows Vista, for secondary logons and services,
the environment variables `HOMEDRIVE`/`HOMEPATH` point to Windows'
system directory (usually `C:\Windows\system32`).

That is undesirable, and that location is usually write-protected anyway.

So let's verify that the `HOMEDRIVE`/`HOMEPATH` combo does not point to
Windows' system directory before using it, falling back to `USERPROFILE`
if it does.

This fixes git-for-windows#2709

Initial-Path-by: Ivan Pozdeev <vano@mail.mipt.ru>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
headless-git is a git executable without opening a console window. It is
useful when other GUI executables want to call git. We should install it
together with git on Windows.

Signed-off-by: Yuyi Wang <Strawberry_Str@hotmail.com>
winuser.h contains the definition of RT_MANIFEST that our LLVM based
toolchain needs to understand that we want to embed
compat/win32/git.manifest as an application manifest. It currently just
embeds it as additional data that Windows doesn't understand.

This also helps our GCC based toolchain understand that we only want one
copy embedded. It currently embeds one working assembly manifest and one
nearly identical, but useless copy as additional data.

This also teaches our Visual Studio based buildsystems to pick up the
manifest file from git.rc. This means we don't have to explicitly specify
it in contrib/buildsystems/Generators/Vcxproj.pm anymore. Slightly
counter-intuitively this also means we have to explicitly tell Cmake
not to embed a default manifest.

This fixes git-for-windows#4707

Signed-off-by: Matthias Aßhauer <mha1993@live.de>
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
This will help with Git for Windows' maintenance going forward: It
allows Git for Windows to switch its primary libcurl to a variant
without the OpenSSL backend, while still loading an alternate when
setting `http.sslBackend = openssl`.

This is necessary to avoid maintenance headaches with upgrading OpenSSL:
its major version name is encoded in the shared library's file name and
hence major version updates (temporarily) break libraries that are
linked against the OpenSSL library.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In Git for Windows v2.39.0, we fixed a regression where `git.exe` would
no longer work in Windows Nano Server (frequently used in Docker
containers).

This GitHub workflow can be used to verify manually that the Git/Scalar
executables work in Nano Server.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When running Git for Windows on a remote APFS filesystem, it would
appear that the `mingw_open_append()`/`write()` combination would fail
almost exactly like on some CIFS-mounted shares as had been reported in
git-for-windows#2753, albeit with a
different `errno` value.

Let's handle that `errno` value just the same, by suggesting to set
`windows.appendAtomically=false`.

Signed-off-by: David Lomas <dl3@pale-eds.co.uk>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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>
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>
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>
`git repo structure` walks every reference enumerated by
`refs_for_each_ref()` and feeds each reference's tip into the path
walk that produces the object counts. There is no way to scope the
inquiry to a subset of refs, even though that is the most common
need when an operator is investigating what part of the history is
driving cost: only branches, only release tags, only one remote's
view, etc.

Add a single `--ref-filter=<pattern>` option that, when given,
restricts both the reference count and the object walk to refs whose
full name matches one of the patterns. The option is repeatable;
multiple patterns form a union, so `--ref-filter='refs/heads/*'
--ref-filter='refs/tags/v*'` includes local branches and tags whose
short name starts with `v`. Patterns use `wildmatch()` with
`WM_PATHNAME` semantics so a `*` does not cross `/`, matching the
convention used by `git for-each-ref` positional arguments.

Choosing a single flexible filter, rather than a proliferation of
per-kind flags like `--branches`, `--tags`, `--remotes`, keeps the
option surface small and lets the same mechanism express
narrow selections the per-kind flags could not, such as "only release
tags" (`'refs/tags/v*'`) or "only one remote's branches"
(`'refs/remotes/origin/*'`). Without `--ref-filter`, behaviour is
unchanged: every ref `refs_for_each_ref()` enumerates contributes.

Both the reference counter and the path-walk seeding (via
`add_pending_oid()`) sit on the same callback, so an early return
when no pattern matches naturally excludes a ref from both. No
separate object-walk machinery is needed.

Cover the two interesting code paths with tests in t1901: a single
filter narrowing to branches, and two filters unioning to include
both branches and tags.

Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Continue the size_t evacuation around large object handling: with
deflate_it() and the locals around it widened, the
cast_size_t_to_ulong() shim the prior delta_delta() widening had to
leave behind in emit_binary_diff_body() goes away. deflate_it() is
file-static; the only callers are the two in emit_binary_diff_body()
already touched here.

emit_diff_symbol() formats the resulting sizes via uintmax_t / %"PRIuMAX",
so the diff output is not affected; only the per-process upper bound
on a binary patch chunk that this function can address grows beyond
4 GiB on Windows.

Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
`git survey` distinguishes itself from `git repo structure` largely by
its path-level reporting: in addition to whole-repo totals it lists the
paths whose object histories dominate the repository, ranked by raw
count, on-disk size, and inflated size, separately for trees and blobs.
That is often the most actionable output from `git survey`, since it
points an operator at the directories and files that should be reviewed
for cleanup, sparse-checkout exclusion, or rewriting.

`git repo structure` already drives the same path-walk traversal that
`git survey` uses to gather its per-path numbers; the callback simply
discards the path. Aggregate per-(path, type) summaries inside that
existing callback and add a bounded, descending-sorted "top-N" table
keyed by each of the three axes. Gate the feature behind a new
`--top=<n>` option, defaulting to 0, so unadorned invocations are
unaffected and pay no extra work for the top-N tracking.

Mirror the sort and eviction strategy from `builtin/survey.c`: keep an
array of at most N entries sorted from largest to smallest, walk it
from the bottom on each candidate, and shift entries down when a new
one belongs. Compared to `builtin/survey.c`, drop the void-pointer
indirection in the table data, type the comparator's arguments, and
fold the trivial comparators into the `(a > b) - (a < b)` idiom.

For the human-readable `table` output, extend the existing nested
bullet layout with two new top-level sections, `* Top trees` and
`* Top blobs`, each containing three sub-tables (`Top by count`,
`Top by disk size`, `Top by inflated size`). The path becomes the row
name and the relevant scalar becomes the value, reusing
`stats_table_count_addf` and `stats_table_size_addf` so units and
column alignment match the rest of the table.

For the `lines`/`nul` key-value formats, emit one
`objects.<type>.top.by_<axis>.<rank>.path=<path>` entry alongside an
`objects.<type>.top.by_<axis>.<rank>.<axis>=<value>` entry per ranked
path, so consumers can dispatch by axis without parsing the schema.
The root tree's path is the empty string as produced by the path-walk
machinery; preserve that as-is to stay faithful to the upstream
representation rather than fabricating a placeholder.

This is the first piece of folding `git survey`'s functionality into
`git repo structure`. Subsequent commits will add the corresponding
configuration knob and, eventually, turn `git survey` into a thin
deprecated shim over `git repo structure`.

Assisted-by: Opus 4.7
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 git-for-windows#2404

Helped-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Prep for the upcoming read_blob_data_from_index() widening, whose
callers in convert.c feed the size they receive straight into these
two helpers. Both are file-static, so the change is contained.

Also fixes a small pre-existing narrowing on the get_wt_convert_stats_ascii()
path, where strbuf.len (size_t) was passed to a unsigned long
parameter.

Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The preceding commit added `--top=<n>` to `git repo structure`,
reporting the top-N paths per type ranked by count, on-disk size, and
inflated size. Cover the three behaviors that matter for that option:

  * Without `--top`, the key-value output emits no `top.*` keys, so
    existing parsers stay unaffected.

  * `--top=N` produces exactly N ranked entries on each of the six
    `objects.<type>.top.by_<axis>` axes (count/disk_size/inflated_size
    crossed with trees/blobs), and a constructed input where one blob
    is several orders of magnitude bigger than the other lets us
    assert the ordering on the disk-size and inflated-size axes.

  * A negative `--top` is rejected with a non-zero exit and a message
    naming the constraint, so a typo cannot silently degrade into the
    default zero.

Avoid grep patterns starting with `--`; grep would parse the leading
double dash as an option terminator.

Assisted-by: Opus 4.7
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 will come in handy in the next commit.

Signed-off-by: JiSeop Moon <zcube@zcube.kr>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Bert Belder <bertbelder@gmail.com>
Continue the size_t evacuation. read_blob_data_from_index() reads
the blob through the size_t odb_read_object() API but writes the
size back through an unsigned long out-parameter, silently
truncating anything past 4 GiB on Windows. Widen the out-parameter,
drop the cast_size_t_to_ulong() shim, and move the matching locals
in the two convert.c callers and the one in attr.c. Their
downstream consumers (gather_convert_stats() widened in the prior
commit and read_attr_from_buf() already size_t) take the new type
directly.

Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
`git survey` exposes its `--top` default via `survey.top` so that a
site or per-repository operator can switch the detail tables on once
and have every subsequent invocation include them. Mirror that
ergonomics for `git repo structure` so that, as `git survey`'s
functionality is folded into `git repo structure`, the configuration
side of the migration story stays equivalent.

Add a small `git_config_int` callback bound to `repo.structure.top`
and invoke it before `parse_options()`, so a `--top=<N>` on the
command line cleanly overrides the configured default (including
`--top=0` to opt out of the detail tables when configuration enables
them). Reject negative configured values with the same wording as the
command-line guard, since `git_config_int()` happily returns negative
integers.

Document the new variable in a fresh `Documentation/config/repo.adoc`
and wire it into the alphabetical includes in `Documentation/config.adoc`
between `repack.adoc` and `rerere.adoc`. Cover the precedence
behaviour with a t1901 test: a configured value enables the tables by
default, and a command-line `--top=0` suppresses them again.

Note that the reported paths respect the `core.quotePath` setting.

Assisted-by: Opus 4.7
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>
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>
It is a known issue that a rename() can fail with an "Access denied"
error at times, when copying followed by deleting the original file
works. Let's just fall back to that behavior.

Signed-off-by: JiSeop Moon <zcube@zcube.kr>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
On Windows, symbolic links actually have a type depending on the target:
it can be a file or a directory.

In certain circumstances, this poses problems, e.g. when a symbolic link
is supposed to point into a submodule that is not checked out, so there
is no way for Git to auto-detect the type.

To help with that, we will add support over the course of the next
commits to specify that symlink type via the Git attributes. This
requires an index_state, though, something that Git for Windows'
`symlink()` replacement cannot know about because the function signature
is defined by the POSIX standard and not ours to change.

So let's introduce a helper function to create symbolic links that
*does* know about the index_state.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Prep for the widenings of its callers, where size-receiving locals
will become size_t (combine-diff's result_size in the immediately
following commit, struct diff_filespec.size in a later topic). Body
caps the parameter at 8000 anyway, so the type change is mechanical.

Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho and others added 23 commits September 28, 2026 21:06
When t5605 tries to verify that files are hardlinked (or that they are
not), it uses the `-links` option of the `find` utility.

BusyBox' implementation does not support that option, and BusyBox-w32's
lstat() does not even report the number of hard links correctly (for
performance reasons).

So let's just switch to a different method that actually works on
Windows.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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>
Git for Windows uses MSYS2's Bash to run the test suite, which comes
with benefits but also at a heavy price: on the plus side, MSYS2's
POSIX emulation layer allows us to continue pretending that we are on a
Unix system, e.g. use Unix paths instead of Windows ones, yet this is
bought at a rather noticeable performance penalty.

There *are* some more native ports of Unix shells out there, though,
most notably BusyBox-w32's ash. These native ports do not use any POSIX
emulation layer (or at most a *very* thin one, choosing to avoid
features such as fork() that are expensive to emulate on Windows), and
they use native Windows paths (usually with forward slashes instead of
backslashes, which is perfectly legal in almost all use cases).

And here comes the problem: with a $PWD looking like, say,
C:/git-sdk-64/usr/src/git/t/trash directory.t5813-proto-disable-ssh
Git's test scripts get quite a bit confused, as their assumptions have
been shattered. Not only does this path contain a colon (oh no!), it
also does not start with a slash.

This is a problem e.g. when constructing a URL as t5813 does it:
ssh://remote$PWD. Not only is it impossible to separate the "host" from
the path with a $PWD as above, even prefixing $PWD by a slash won't
work, as /C:/git-sdk-64/... is not a valid path.

As a workaround, detect when $PWD does not start with a slash on
Windows, and simply strip the drive prefix, using an obscure feature of
Windows paths: if an absolute Windows path starts with a slash, it is
implicitly prefixed by the drive prefix of the current directory. As we
are talking about the current directory here, anyway, that strategy
works.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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>
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>
On Windows, the current working directory is pretty much guaranteed to
contain a colon. If we feed that path to CVS, it mistakes it for a
separator between host and port, though.

This has not been a problem so far because Git for Windows uses MSYS2's
Bash using a POSIX emulation layer that also pretends that the current
directory is a Unix path (at least as long as we're in a shell script).

However, that is rather limiting, as Git for Windows also explores other
ports of other Unix shells. One of those is BusyBox-w32's ash, which is
a native port (i.e. *not* using any POSIX emulation layer, and certainly
not emulating Unix paths).

So let's just detect if there is a colon in $PWD and punt in that case.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Includes touch-ups by 마누엘, Philip Oakley and 孙卓识.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
…ITOR"

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

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

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

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

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

dscho commented Sep 28, 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 Sep 28, 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.

@dscho
dscho merged commit 49d759b into git-for-windows:main Sep 28, 2026
85 of 86 checks passed
@dscho
dscho deleted the rebase-to-v2.56.0 branch September 28, 2026 20:51
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.56.0