Skip to content

Conversation

dscho
Copy link
Member

@dscho dscho commented Oct 15, 2025

The usual PR before releasing.

@dscho dscho added this to the Next release milestone Oct 15, 2025
@dscho dscho self-assigned this Oct 15, 2025
@dscho dscho force-pushed the rebase-to-v2.51.1 branch from 83f58f5 to 4fdf899 Compare October 15, 2025 20:30
@dscho
Copy link
Member Author

dscho commented Oct 15, 2025

Range-diff relative to main
  • 1: e9493c5 (upstream: e9493c5) < -: ------------ Documentation/git-reflog: convert to use synopsis type

  • 2: 649c7bb (upstream: 649c7bb) < -: ------------ builtin/reflog: improve grouping of subcommands

  • 3: 1ffd2d4 (upstream: 1ffd2d4) < -: ------------ refs: export ref_transaction_update_reflog()

  • 4: 7aa619c (upstream: 7aa619c) < -: ------------ builtin/reflog: implement subcommand to write new entries

  • 5: 9fdbba8 (upstream: 9fdbba8) < -: ------------ ident: fix type of string length parameter

  • 6: ec922e0 (upstream: ec922e0) < -: ------------ refs: fix identity for migrated reflogs

  • 7: 211fa8b (upstream: 211fa8b) < -: ------------ refs/files: detect race when generating reflog entry for HEAD

  • 8: 046c673 (upstream: 046c673) < -: ------------ refs: stop unsetting REF_HAVE_OLD for log-only updates

  • 9: 465eff8 (upstream: 465eff8) < -: ------------ refs: fix invalid old object IDs when migrating reflogs

  • 10: 4d491ad (upstream: 4d491ad) < -: ------------ rebase -i: permit 'drop' of a merge commit

  • 11: c5a2c76 (upstream: c5a2c76) < -: ------------ merge-ort: update comments to modern testfile location

  • 12: edbe2ab (upstream: edbe2ab) < -: ------------ merge-ort: drop unnecessary temporary in check_for_directory_rename()

  • 13: 034b2fd (upstream: 034b2fd) < -: ------------ t6423: document two bugs with rename-to-self testcases

  • 14: db5015a (upstream: db5015a) < -: ------------ t6423: fix missed staging of file in testcases 12i,12j,12k

  • 15: d3de978 (upstream: d3de978) < -: ------------ merge-ort: clarify the interning of strings in opt->priv->path

  • 16: 885ffe5 (upstream: 885ffe5) < -: ------------ merge-ort: fix incorrect file handling

  • 17: f6ecb60 (upstream: f6ecb60) < -: ------------ merge-ort: fix directory rename on top of source of other rename/delete

  • 18: b55e6d3 (upstream: b55e6d3) < -: ------------ diff: ensure consistent diff behavior with ignore options

  • 19: 31e5d03 (upstream: 31e5d03) < -: ------------ t5516: remove surrounding empty lines in test bodies

  • 20: b33c590 (upstream: b33c590) < -: ------------ remote.c: remove BUG in show_push_unqualified_ref_name_error()

  • 21: dfbfc22 (upstream: dfbfc22) < -: ------------ remote.c: convert if-else ladder to switch

  • 22: e1d3d61 (upstream: e1d3d61) < -: ------------ diff: --no-index should ignore the worktree

  • 23: b71a0ba = 1: f11d5dd sideband: mask control characters

  • 24: 4995805 = 2: 87fa2d0 sideband: introduce an "escape hatch" to allow control characters

  • 25: 7657a6a = 3: 103a80f sideband: do allow ANSI color sequences by default

  • 256: 3a45c7b (upstream: 3a45c7b) ! 4: bc694df midx-write: put failing response value back

    @@ midx-write.c: static int write_midx_internal(struct repository *r, const char *o
      		goto cleanup;
      	}
      
    -
    - ## t/t5319-multi-pack-index.sh ##
    -@@ t/t5319-multi-pack-index.sh: test_expect_success 'load reverse index when missing .idx, .pack' '
    - 		mv $idx.bak $idx &&
    - 
    - 		mv $pack $pack.bak &&
    --		git cat-file --batch-check="%(objectsize:disk)" <tip
    -+		git cat-file --batch-check="%(objectsize:disk)" <tip &&
    -+
    -+		test_must_fail git multi-pack-index write 2>err &&
    -+		test_grep "could not load pack" err
    - 	)
    - '
    - 
  • -: ------------ > 5: 82f355b midx-write: simplify error cases

  • 269: 064468e = 6: 6d7ccd7 sparse-checkout: remove use of the_repository

  • 270: 2520efd = 7: 7be8b37 sparse-checkout: add basics of 'clean' command

  • 271: a8077c1 = 8: 75873a0 sparse-checkout: match some 'clean' behavior

  • 272: 1588e83 = 9: 4a877b5 dir: add generic "walk all files" helper

  • 273: 5b5a7f5 = 10: bddcd7e sparse-checkout: add --verbose option to 'clean'

  • 274: 66c11bd = 11: 7880a2f sparse-index: point users to new 'clean' action

  • 275: 592d2a9 = 12: 549bbe4 t: expand tests around sparse merges and clean

  • 283: 40f6c69 = 13: e8bb0c6 contrib/subtree: fix split with squashed subtrees

  • 284: 18c819b = 14: 0fa5b24 diff --no-index: fix logic for paths ending in '/'

  • 285: ade1f1c = 15: 8e5ea51 diff --no-index: fix logic for paths ending in '/'

  • 26: c19f5d0 = 16: 85e4e72 unix-socket: avoid leak when initialization fails

  • 27: dd73428 = 17: 3822ff4 grep: prevent ^$ false match at end of file

  • 28: 629860b = 18: 6ba9c89 t9350: point out that refs are not updated correctly

  • 30: ebfc564 = 19: b90ec50 transport-helper: add trailing --

  • 29: 123487f = 20: 94a01e4 mingw: avoid relative #includes

  • 32: f5eebce = 21: 5a6f1a3 remote-helper: check helper status after import/export

  • 33: 930f30d = 22: 6024420 mingw: demonstrate a problem with certain absolute paths

  • 34: 1f29a93 = 23: f2a9da6 clean: do not traverse mount points

  • 31: d4fa0d1 = 24: a692add mingw: order #includes alphabetically

  • 35: 3da588f = 25: b93cb4a Always auto-gc after calling a fast-import transport

  • 36: a635513 = 26: ccbba20 mingw: allow absolute paths without drive prefix

  • 38: 7204213 = 27: cbb12fe mingw: include the Python parts in the build

  • 39: 021d198 = 28: e55b985 win32/pthread: avoid name clashes with winpthread

  • 40: 248d77f = 29: d66f7cb git-compat-util: avoid redeclaring _DEFAULT_SOURCE

  • 41: c52e65d = 30: 160752b Import the source code of mimalloc v2.2.4

  • 42: a73adbc = 31: 98e8ee3 mimalloc: adjust for building inside Git

  • 43: d5d7ca4 = 32: d5d26b3 mimalloc: offer a build-time option to enable it

  • 44: e41f08b = 33: 0e9a581 mingw: use mimalloc

  • 37: 940c9be = 34: 6f4884e clean: remove mount points when possible

  • 46: 8eed87a = 35: 644a62f mingw: demonstrate a git add issue with NTFS junctions

  • 47: e10e4ab = 36: a037d28 strbuf_realpath(): use platform-dependent API if available

  • 45: ced0807 = 37: 54fa376 transport: optionally disable side-band-64k

  • 48: 32836bb = 38: abf240e mingw: do resolve symlinks in getcwd()

  • 49: aed3ff2 = 39: 5004629 mingw: fix fatal error working on mapped network drives on Windows

  • 50: 8f508b2 = 40: 0d11719 clink.pl: fix MSVC compile script to handle libcurl-d.lib

  • 51: 59be840 = 41: 96ee7d8 mingw: implement a platform-specific strbuf_realpath()

  • 52: e457bb0 = 42: abca302 mingw: ensure valid CTYPE

  • 56: a0b57b5 = 43: b5c9858 t5505/t5516: allow running without .git/branches/ in the templates

  • 53: 1710ac1 = 44: ccd163a mingw: allow git.exe to be used instead of the "Git wrapper"

  • 57: 65d47d7 = 45: f5e84a5 t5505/t5516: fix white-space around redirectors

  • 54: 76f3cd6 = 46: 82a9305 mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory

  • 55: a0bc5b1 = 47: 9a076a4 http: use new "best effort" strategy for Secure Channel revoke checking

  • 58: 65df47a = 48: da8f5fa t3701: verify that we can add lots of files interactively

  • 61: 01d8c1e = 49: 8d986a5 clink.pl: fix libexpatd.lib link error when using MSVC

  • 62: 58fd9f5 = 50: b2ec027 Makefile: clean up .ilk files when MSVC=1

  • 63: bb6dc15 = 51: f0b8a4b vcbuild: add support for compiling Windows resource files

  • 65: fd49406 = 52: 66da5b4 config.mak.uname: add git.rc to MSVC builds

  • 59: bbdff99 = 53: d986f04 commit: accept "scissors" with CR/LF line endings

  • 60: ada7407 ! 54: 7d51e7f t0014: fix indentation

    @@ Commit message
         Signed-off-by: Johannes Schindelin <[email protected]>
     
      ## t/t0014-alias.sh ##
    -@@ t/t0014-alias.sh: test_expect_success 'looping aliases - internal execution' '
    +@@ t/t0014-alias.sh: test_expect_success 'looping aliases - deprecated builtins' '
      #'
      
      test_expect_success 'run-command formats empty args properly' '
  • 64: eb5e096 = 55: f0aa5b4 git-gui: accommodate for intent-to-add files

  • 69: d0d2e30 = 56: d87d409 vcpkg_install: detect lack of Git

  • 70: fd78b76 = 57: fe37b42 vcpkg_install: add comment regarding slow network connections

  • 71: de324cc = 58: 2caabf7 vcbuild: install ARM64 dependencies when building ARM64 binaries

  • 72: 3f252c7 = 59: 676b05d vcbuild: add an option to install individual 'features'

  • 73: 559cb76 = 60: 6a0df04 cmake: allow building for Windows/ARM64

  • 66: 8855918 = 61: eb80649 clink.pl: ignore no-stack-protector arg on MSVC=1 builds

  • 74: cfd4e29 = 62: 5b726d1 ci(vs-build) also build Windows/ARM64 artifacts

  • 67: 12509fe = 63: 2d19780 clink.pl: move default linker options for MSVC=1 builds

  • 75: af666d1 = 64: bfce0cd Add schannel to curl installation

  • 68: 4e71e72 = 65: bc8c558 cmake: install headless-git.

  • 76: 96a535f = 66: e801eba cmake(): allow setting HOST_CPU for cross-compilation

  • 81: abafe48 = 67: 1eaa485 CMake: default Visual Studio generator has changed

  • 77: d3cd8d7 = 68: d7874e9 subtree: update contrib/subtree test target

  • 82: c91bec9 = 69: 49eaf15 .gitignore: add Visual Studio CMakeSetting.json file

  • 78: 815b051 = 70: 5627dd4 mingw: allow for longer paths in parse_interpreter()

  • 79: db4cb51 = 71: dee2579 compat/vcbuild: document preferred way to build in Visual Studio

  • 80: 8df9f76 = 72: 533f639 http: optionally send SSL client certificate

  • 84: 4f6dc69 = 73: 86288df ci: run contrib/subtree tests in CI builds

  • 87: ed96e8b = 74: 3e4a5d7 hash-object: demonstrate a >4GB/LLP64 problem

  • 88: d33fc04 = 75: 3eb6f06 object-file.c: use size_t for header lengths

  • 89: b65f763 = 76: c765195 hash algorithms: use size_t for section lengths

  • 90: 09cf0fb = 77: f1c0bd8 hash-object --stdin: verify that it works with >4GB/LLP64

  • 83: 40a1b07 = 78: 3cd642d CMakeLists: add default "x64-windows" arch for Visual Studio

  • 91: 28ecf2e = 79: 0a69d17 hash-object: add another >4GB/LLP64 test case

  • 85: 7234e38 = 80: 2bbf5ab CMake: show Win32 and Generator_platform build-option values

  • 86: 8e53441 = 81: 32c4c8e init: do parse all core.* settings early

  • 93: ef31e90 = 82: c5d1823 hash-object: add a >4GB/LLP64 test case using filtered input

  • 92: 11ffdf4 = 83: 71f5315 setup: properly use "%(prefix)/" when in WSL

  • 95: 703d1cc = 84: 5a39f31 Add config option windows.appendAtomically

  • 94: 8f569fa = 85: 01ffe83 compat/mingw.c: do not warn when failing to get owner

  • 96: 57b0497 = 86: b085be0 mingw: $env:TERM="xterm-256color" for newer OSes

  • 97: f844329 = 87: 5ecdd28 winansi: check result and Buffer before using Name

  • 99: ed81223 = 88: 1fc2a53 MinGW: link as terminal server aware

  • 98: fc766c7 = 89: 9d92a61 mingw: change core.fsyncObjectFiles = 1 by default

  • 100: 967a8f9 = 90: 76e81f5 Fix Windows version resources

  • 101: 6869818 = 91: 68b966d status: fix for old-style submodules with commondir

  • 102: 6d2a6fb ! 92: 1c59852 http: optionally load libcurl lazily

    @@ compat/lazyload-curl.c (new)
     +typedef void (*curl_global_cleanup_type)(void);
     +static curl_global_cleanup_type curl_global_cleanup_func;
     +
    ++typedef CURLcode (*curl_global_trace_type)(const char *config);
    ++static curl_global_trace_type curl_global_trace_func;
    ++
     +typedef struct curl_slist *(*curl_slist_append_type)(struct curl_slist *list, const char *data);
     +static curl_slist_append_type curl_slist_append_func;
     +
    @@ compat/lazyload-curl.c (new)
     +	curl_global_init_func = (curl_global_init_type)load_function(libcurl, "curl_global_init");
     +	curl_global_sslset_func = (curl_global_sslset_type)load_function(libcurl, "curl_global_sslset");
     +	curl_global_cleanup_func = (curl_global_cleanup_type)load_function(libcurl, "curl_global_cleanup");
    ++	curl_global_trace_func = (curl_global_trace_type)load_function(libcurl, "curl_global_trace");
     +	curl_slist_append_func = (curl_slist_append_type)load_function(libcurl, "curl_slist_append");
     +	curl_slist_free_all_func = (curl_slist_free_all_type)load_function(libcurl, "curl_slist_free_all");
     +	curl_easy_strerror_func = (curl_easy_strerror_type)load_function(libcurl, "curl_easy_strerror");
    @@ compat/lazyload-curl.c (new)
     +	curl_global_cleanup_func();
     +}
     +
    ++CURLcode curl_global_trace(const char *config)
    ++{
    ++	lazy_load_curl();
    ++	return curl_global_trace_func(config);
    ++}
    ++
     +struct curl_slist *curl_slist_append(struct curl_slist *list, const char *data)
     +{
     +	lazy_load_curl();
  • 103: a40853e = 93: 4d51ef9 http: support lazy-loading libcurl also on Windows

  • 104: 4c59683 = 94: f60fe4f http: when loading libcurl lazily, allow for multiple SSL backends

  • 105: db845a7 = 95: af53ab7 windows: skip linking git-<command> for built-ins

  • 106: af5df3e = 96: bedd6f5 mingw: do load libcurl dynamically by default

  • 107: d532804 = 97: 0573808 Add a GitHub workflow to verify that Git/Scalar work in Nano Server

  • 108: 8219a9d = 98: e61df86 mingw: suggest windows.appendAtomically in more cases

  • 109: 1764594 = 99: 6521dfe win32: use native ANSI sequence processing, if possible

  • 110: c1daa33 = 100: e8d926b git.rc: include winuser.h

  • 111: 1495364 = 101: 091c009 common-main.c: fflush stdout buffer upon exit

  • 112: 83c33e8 = 102: ddef55d t5601/t7406(mingw): do run tests with symlink support

  • 113: a6e232f = 103: 66e52ed win32: ensure that localtime_r() is declared even in i686 builds

  • 115: ce58140 = 104: 725ab70 ci: work around a problem with HTTP/2 vs libcurl v8.10.0

  • 116: d4fcb36 = 105: f95b614 revision: create mark_trees_uninteresting_dense()

  • 117: 296d228 = 106: ab41ffb survey: stub in new experimental 'git-survey' command

  • 118: 7a7c814 ! 107: cc887eb survey: add command line opts to select references

    @@ builtin/survey.c: static void survey_load_config(struct survey_context *ctx)
     +		switch (item->kind) {
     +		case FILTER_REFS_TAGS:
     +			ctx->report.refs.tags_nr++;
    -+			if (oid_object_info(ctx->repo,
    -+					    &item->objectname,
    -+					    &size) == OBJ_TAG)
    ++			if (odb_read_object_info(ctx->repo->objects,
    ++						 &item->objectname,
    ++						 &size) == OBJ_TAG)
     +				ctx->report.refs.tags_annotated_nr++;
     +			break;
     +
  • 114: 0105049 = 108: 8b1e05e Fallback to AppData if XDG_CONFIG_HOME is unset

  • 119: 55d8165 = 109: 61481ec run-command: be helpful with Git LFS fails on Windows 7

  • 120: e9dfece = 110: f3076ef survey: start pretty printing data in table form

  • 121: e781248 = 111: af59487 survey: add object count summary

  • 122: 41b38fa ! 112: 2df4836 survey: summarize total sizes by object type

    @@ builtin/survey.c: static void increment_object_counts(
     +		oi.sizep = &object_length;
     +		oi.disk_sizep = &disk_sizep;
     +
    -+		if (oid_object_info_extended(ctx->repo, &oids->oid[i],
    -+					     &oi, oi_flags) < 0) {
    ++		if (odb_read_object_info_extended(ctx->repo->objects,
    ++						  &oids->oid[i],
    ++						  &oi, oi_flags) < 0) {
     +			summary->num_missing++;
     +		} else {
     +			summary->nr++;
  • 123: c051c53 = 113: a2f2640 survey: show progress during object walk

  • 124: 5d82c4d = 114: 38d677b survey: add ability to track prioritized lists

  • 125: ba47cab = 115: 982e87d survey: add report of "largest" paths

  • 127: 1ab2e22 = 116: fc26d15 mingw: make sure errno is set correctly when socket operations fail

  • 126: 1871a99 = 117: 9448fb8 survey: add --top= option and config

  • 129: 6bf35ce = 118: 8370da3 compat/mingw: handle WSA errors in strerror

  • 128: 9c6416f = 119: 0faed2f survey: clearly note the experimental nature in the output

  • 130: f68864e = 120: 589d630 compat/mingw: drop outdated comment

  • 131: 6856aee = 121: ded6dae t0301: actually test credential-cache on Windows

  • 132: ee41ad8 = 122: cb16d82 credential-cache: handle ECONNREFUSED gracefully

  • 133: d1b1f5b = 123: d6d7cb5 max_tree_depth: lower it for clangarm64 on Windows

  • 134: ab203dd = 124: b8cb26b reftable: do make sure to use custom allocators

  • 135: 52b2778 = 125: f5b90e6 check-whitespace: avoid alerts about upstream commits

  • 136: cc432bd = 126: 8d4cda4 refs: forbid clang to complain about unreachable code

  • 137: 07d2c4f = 127: 353ee00 mingw: avoid the comma operator

  • 249: eed2018 ! 128: f5cb01d build(deps): bump actions/download-artifact from 4 to 5

    @@ Commit message
         ...
     
         Signed-off-by: dependabot[bot] <[email protected]>
    -    Signed-off-by: Johannes Schindelin <[email protected]>
     
      ## .github/workflows/main.yml ##
     @@ .github/workflows/main.yml: jobs:
  • 248: e0490d5 = 129: 4319f4c build(deps): bump actions/checkout from 4 to 5

  • 263: 858588d = 130: 4831c82 build(deps): bump actions/setup-python from 5 to 6

  • 289: 8e4b968 = 131: fdc7355 wincred: Avoid memory corruption

  • 264: f718af1 = 132: cd05768 build(deps): bump actions/github-script from 7 to 8

  • 138: f11938e = 133: 76ecb4b git-gui: provide question helper for retry fallback on Windows

  • 139: ba2fdd9 = 134: 26534fa git gui: set GIT_ASKPASS=git-gui--askpass if not set yet

  • 140: 1160cf5 = 135: d0df367 git-gui--askyesno: fix funny text wrapping

  • 141: 9d8c2a6 = 136: 7cc4b46 git-gui--askyesno: allow overriding the window title

  • 142: 9934c5c = 137: 01c225a git-gui--askyesno (mingw): use Git for Windows' icon, if available

  • 143: 349c6ae = 138: 3fb511e Win32: make FILETIME conversion functions public

  • 144: bc51e0f = 139: e853e72 Win32: dirent.c: Move opendir down

  • 145: d2577dc = 140: baef1c5 mingw: make the dirent implementation pluggable

  • 146: 1a4108d = 141: b2f7dda Win32: make the lstat implementation pluggable

  • 147: 1c34281 = 142: 9724770 mingw: add infrastructure for read-only file system level caches

  • 148: 834bf55 = 143: 98068d6 mingw: add a cache below mingw's lstat and dirent implementations

  • 149: dada487 = 144: 4799789 fscache: load directories only once

  • 150: fc6b3d7 = 145: aaed016 fscache: add key for GIT_TRACE_FSCACHE

  • 151: 032137b = 146: 451173d fscache: remember not-found directories

  • 152: 058dd96 = 147: 6456f06 fscache: add a test for the dir-not-found optimization

  • 153: 5d728fb = 148: b5240fd add: use preload-index and fscache for performance

  • 154: ae65ce9 = 149: c6cf824 dir.c: make add_excludes aware of fscache during status

  • 155: aa49ca0 = 150: 8472521 fscache: make fscache_enabled() public

  • 156: 5905fe4 = 151: 9d49980 dir.c: regression fix for add_excludes with fscache

  • 157: 151a012 = 152: 2097a61 fetch-pack.c: enable fscache for stats under .git/objects

  • 158: 66556c0 = 153: 674bd2b checkout.c: enable fscache for checkout again

  • 159: e856629 = 154: e2ed9b1 Enable the filesystem cache (fscache) in refresh_index().

  • 160: 5d2adec = 155: 4432910 fscache: use FindFirstFileExW to avoid retrieving the short name

  • 161: eed5864 = 156: 5bab135 fscache: add GIT_TEST_FSCACHE support

  • 162: bd7feb5 = 157: d720773 fscache: add fscache hit statistics

  • 163: c05a5cd = 158: 82aca9f unpack-trees: enable fscache for sparse-checkout

  • 164: 7f21aaf = 159: fcc8fea status: disable and free fscache at the end of the status command

  • 165: 87656c2 = 160: 264cfe0 mem_pool: add GIT_TRACE_MEMPOOL support

  • 166: a2202da = 161: 87f42f8 fscache: fscache takes an initial size

  • 167: 5b9364c = 162: 86bb559 fscache: update fscache to be thread specific instead of global

  • 168: 7f619d7 = 163: 759bb0e fscache: teach fscache to use mempool

  • 169: 9517021 = 164: bc95529 fscache: make fscache_enable() thread safe

  • 170: 4bf7963 = 165: d13e0f5 fscache: teach fscache to use NtQueryDirectoryFile

  • 171: 900d66a = 166: 05dcb89 fscache: remember the reparse tag for each entry

  • 172: 6ab32e8 = 167: e0fa2ca fscache: implement an FSCache-aware is_mount_point()

  • 173: 89ba8ac = 168: 75fe02f clean: make use of FSCache

  • 174: 48a3658 = 169: b0fd6ca pack-objects (mingw): demonstrate a segmentation fault with large deltas

  • 175: c9fd5c0 = 170: a2b2d62 mingw: support long paths

  • 176: 89a7bdf = 171: 7b455b0 Win32: fix 'lstat("dir/")' with long paths

  • 177: af10eef = 172: 748b499 win32(long path support): leave drive-less absolute paths intact

  • 178: 5b60127 = 173: d609018 compat/fsmonitor/fsm-*-win32: support long paths

  • 179: 39a5d71 = 174: 00cb9bf clean: suggest using core.longPaths if paths are too long to remove

  • 180: feb8729 = 175: e2d1918 mingw: Support git_terminal_prompt with more terminals

  • 181: 282ced4 = 176: 1cabe9b compat/terminal.c: only use the Windows console if bash 'read -r' fails

  • 182: 634a45d = 177: abe0d6e mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method

  • 183: 80d7e3e = 178: 0eef90b strbuf_readlink: don't call readlink twice if hint is the exact link size

  • 184: 902c58c = 179: cf39bec strbuf_readlink: support link targets that exceed PATH_MAX

  • 185: 0e1b18e = 180: 8ac2707 lockfile.c: use is_dir_sep() instead of hardcoded '/' checks

  • 186: 2ddd834 = 181: 514c8dc Win32: don't call GetFileAttributes twice in mingw_lstat()

  • 187: bbdfe58 = 182: 4fb0dfd Win32: implement stat() with symlink support

  • 188: abefbc3 = 183: 08f323b Win32: remove separate do_lstat() function

  • 189: 5ad8ef9 = 184: 48c19d1 Win32: let mingw_lstat() error early upon problems with reparse points

  • 190: f3acc78 = 185: 9e198f2 mingw: teach fscache and dirent about symlinks

  • 191: e53069d = 186: ea782d9 Win32: lstat(): return adequate stat.st_size for symlinks

  • 192: 14cc224 = 187: 55b9631 Win32: factor out retry logic

  • 193: ec1f3e3 = 188: 8b0a6d5 Win32: change default of 'core.symlinks' to false

  • 194: b913f06 = 189: 1a1557d Win32: add symlink-specific error codes

  • 195: 5ba65fd = 190: b860683 Win32: mingw_unlink: support symlinks to directories

  • 196: 39d4641 = 191: d5d7bba Win32: mingw_rename: support renaming symlinks

  • 197: b0fdedf = 192: 723f729 Win32: mingw_chdir: change to symlink-resolved directory

  • 198: 91e2245 = 193: e3bfcbd Win32: implement readlink()

  • 199: 8fd9671 = 194: 3c336fa mingw: lstat: compute correct size for symlinks

  • 200: 6db5657 = 195: da89715 Win32: implement basic symlink() functionality (file symlinks only)

  • 201: 0bebe91 = 196: 9003325 Win32: symlink: add support for symlinks to directories

  • 202: 79238d9 = 197: 8ea5ab2 mingw: try to create symlinks without elevated permissions

  • 203: fdb859a = 198: b5ee532 mingw: emulate stat() a little more faithfully

  • 204: 44db3c6 = 199: 1f8ac7d mingw: special-case index entries for symlinks with buggy size

  • 205: 0c87c43 = 200: e34f912 mingw: introduce code to detect whether we're inside a Windows container

  • 207: 448b8a7 = 201: 152a379 Win32: symlink: move phantom symlink creation to a separate function

  • 206: d10c217 = 202: 140b829 mingw: when running in a Windows container, try to rename() harder

  • 209: ba4649c = 203: 4078d60 Introduce helper to create symlinks that knows about index_state

  • 208: 93b9d80 = 204: 484fe73 mingw: move the file_attr_to_st_mode() function definition

  • 211: c1ccd2d = 205: ad06096 mingw: allow to specify the symlink type in .gitattributes

  • 210: a0208bb = 206: 8cba656 mingw: Windows Docker volumes are not symbolic links

  • 213: 6da1dd7 = 207: 42a4443 Win32: symlink: add test for symlink attribute

  • 212: 4c865f7 = 208: 00d6f8e mingw: work around rename() failing on a read-only file

  • 214: b5fcf76 = 209: 0ebb6df mingw: explicitly specify with which cmd to prefix the cmdline

  • 215: e653b64 ! 210: 1fd3d14 mingw: when path_lookup() failed, try BusyBox

    @@ compat/mingw.c: static char *path_lookup(const char *cmd, int exe_only)
      
     
      ## t/t0014-alias.sh ##
    -@@ t/t0014-alias.sh: test_expect_success 'looping aliases - internal execution' '
    +@@ t/t0014-alias.sh: test_expect_success 'looping aliases - deprecated builtins' '
      
      test_expect_success 'run-command formats empty args properly' '
      	test_must_fail env GIT_TRACE=1 git frotz a "" b " " c 2>actual.raw &&
  • 216: af22b1b = 211: 92ca01f test-tool: learn to act as a drop-in replacement for iconv

  • 217: 64be7a9 = 212: 6e29ad4 tests(mingw): if iconv is unavailable, use test-helper --iconv

  • 218: 9b0ffbb = 213: f0d41e2 gitattributes: mark .png files as binary

  • 219: 65e4c38 = 214: 33b25e0 tests: move test PNGs into t/lib-diff/

  • 220: 1c84fe8 = 215: 12c8263 tests: only override sort & find if there are usable ones in /usr/bin/

  • 221: 83c8aec = 216: 709569c tests: use the correct path separator with BusyBox

  • 222: 83a3905 = 217: 7c4c938 mingw: only use Bash-ism builtin pwd -W when available

  • 223: 6663800 = 218: cb5b068 tests (mingw): remove Bash-specific pwd option

  • 224: 7bf1782 = 219: f5adc8b test-lib: add BUSYBOX prerequisite

  • 225: 3df20f7 = 220: 109d84b t5003: use binary file from t/lib-diff/

  • 226: ff55bcb = 221: 5e1b28c t5532: workaround for BusyBox on Windows

  • 227: c0fd49d = 222: f1a5833 t5605: special-case hardlink test for BusyBox-w32

  • 228: 3bbebae = 223: a232f67 t5813: allow for $PWD to be a Windows path

  • 229: 48be563 = 224: 8328724 t9200: skip tests when $PWD contains a colon

  • 230: f84da04 = 225: 5446c6b mingw: add a Makefile target to copy test artifacts

  • 232: b40e8ed = 226: 0c33717 mingw: kill child processes in a gentler way

  • 233: 5e9c8e8 = 227: 021b371 mingw: do not call xutftowcs_path in mingw_mktemp

  • 231: 29204a4 = 228: cc39079 mingw: optionally enable wsl compability file mode bits

  • 234: ec4fbf4 = 229: c42cd90 mingw: really handle SIGINT

  • 240: 62a7629 ! 230: 3d919d9 Add a GitHub workflow to monitor component updates

    @@ .github/workflows/monitor-components.yml (new)
     +          - label: curl
     +            feed: https://github.com/curl/curl/tags.atom
     +            title-pattern: ^(?!rc-)
    -+          - label: libgpg-error
    -+            feed: https://github.com/gpg/libgpg-error/releases.atom
    -+            title-pattern: ^libgpg-error-[0-9\.]*$
    -+          - label: libgcrypt
    -+            feed: https://github.com/gpg/libgcrypt/releases.atom
    -+            title-pattern: ^libgcrypt-[0-9\.]*$
    -+          - label: gpg
    -+            feed: https://github.com/gpg/gnupg/releases.atom
    -+            # As per https://gnupg.org/download/index.html#sec-1-1, the stable
    -+            # versions are the one with an even minor version number.
    -+            title-pattern: ^gnupg-\d+\.\d*[02468]\.
     +          - label: mintty
     +            feed: https://github.com/mintty/mintty/releases.atom
     +          - label: 7-zip
  • 235: 190e341 = 231: 6821b4a Partially un-revert "editor: save and reset terminal after calling EDITOR"

  • 236: 403c174 = 232: ba30dde reset: reinstate support for the deprecated --stdin option

  • 242: 1da83a1 = 233: a8ae165 fsmonitor: reintroduce core.useBuiltinFSMonitor

  • 243: 24aa05d = 234: 6853aa5 dependabot: help keeping GitHub Actions versions up to date

  • 237: 81525f0 = 235: 635c8a6 Describe Git for Windows' architecture [no ci]

  • 238: dc18419 = 236: 2fa8960 Modify the Code of Conduct for Git for Windows

  • 239: d1c9406 = 237: bbbd84a CONTRIBUTING.md: add guide for first-time contributors

  • 241: 85846a9 = 238: feaab8e README.md: Add a Windows-specific preamble

  • 244: 6e710c5 = 239: df92d77 Add an issue template

  • 245: 18cd3be = 240: 4267814 Modify the GitHub Pull Request template (to reflect Git for Windows)

  • 246: 815815e = 241: 4fc0c1b SECURITY.md: document Git for Windows' policies

  • 247: 11ac1a8 < -: ------------ build(deps): bump actions/download-artifact from 4 to 5

  • 250: ab60c69 (upstream: ab60c69) < -: ------------ line-log: fix assertion error

  • 251: e310699 (upstream: e310699) < -: ------------ line-log: show all line ranges touched by the same diff range

  • 252: febb9d8 (upstream: febb9d8) < -: ------------ path-walk: fix setup of pending objects

  • 253: 93afe9b (upstream: 93afe9b) < -: ------------ path-walk: create initializer for path lists

  • 254: 8f32a5a (upstream: 8f32a5a) < -: ------------ fetch-pack: re-scan when double-checking graph objects

  • 255: c9388d9 (upstream: c9388d9) < -: ------------ midx-write: only load initialized packs

  • 257: 9c2262d (upstream: 9c2262d) < -: ------------ midx-write: use cleanup when incremental midx fails

  • 258: 68383ac (upstream: 68383ac) < -: ------------ midx-write: use uint32_t for preferred_pack_idx

  • 259: 1f2bc6b (upstream: 1f2bc6b) < -: ------------ midx-write: reenable signed comparison errors

  • 260: c25651a (upstream: c25651a) < -: ------------ midx-write: simplify error cases

  • 261: 7a57fb1 (upstream: 7a57fb1) < -: ------------ t5530: modernize tests

  • 262: 88a2dc6 (upstream: 88a2dc6) < -: ------------ upload-pack: don't ACK non-commits repeatedly in protocol v2

  • 265: 89b4183 (upstream: 89b4183) < -: ------------ stash: pass --no-color to diff plumbing child processes

  • 266: 8c78b5c (upstream: 8c78b5c) < -: ------------ add-interactive: respect color.diff for diff coloring

  • 267: 776d6fb (upstream: 776d6fb) < -: ------------ add-interactive: manually fall back color config to color.ui

  • 268: 1092cd6 (upstream: 1092cd6) < -: ------------ contrib/diff-highlight: mention interactive.diffFilter

  • 276: 3c07063 (upstream: 3c07063) < -: ------------ refs/files: catch conflicts on case-insensitive file-systems

  • 277: 9b62a67 (upstream: 9b62a67) < -: ------------ refs/files: use correct error type when lock exists

  • 278: 770f389 (upstream: 770f389) < -: ------------ refs/files: handle F/D conflicts in case-insensitive FS

  • 279: 948b2ab (upstream: 948b2ab) < -: ------------ refs/files: handle D/F conflicts during locking

  • 280: 5b44c3b (upstream: 5b44c3b) < -: ------------ rebase -i: respect commit.cleanup when picking fixups

  • 281: 82a0a73 (upstream: 82a0a73) < -: ------------ sequencer: remove VERBATIM_MSG flag

  • 282: f198b04 < -: ------------ fixup! Add a GitHub workflow to monitor component updates

  • 286: e4efcd7 (upstream: e4efcd7) < -: ------------ http: offer to cast size_t to curl_off_t safely

  • 287: 580cf0f (upstream: 580cf0f) < -: ------------ imap-send: be more careful when casting to curl_off_t

  • 288: ecc5749 (upstream: ecc5749) < -: ------------ http-push: avoid new compile error

@dscho dscho requested review from mjcheetham and rimrul October 15, 2025 22:06
@dscho dscho linked an issue Oct 16, 2025 that may be closed by this pull request
PhilipOakley and others added 23 commits October 16, 2025 15:21
On LLP64 systems, such as Windows, the size of `long`, `int`, etc. is
only 32 bits (for backward compatibility). Git's use of `unsigned long`
for file memory sizes in many places, rather than size_t, limits the
handling of large files on LLP64 systems (commonly given as `>4GB`).

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

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

Signed-off-by: Philip Oakley <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
Continue walking the code path for the >4GB `hash-object --literally`
test. The `hash_object_file_literally()` function internally uses both
`hash_object_file()` and `write_object_file_prepare()`. Both function
signatures use `unsigned long` rather than `size_t` for the mem buffer
sizes. Use `size_t` instead, for LLP64 compatibility.

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

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

Signed-off-by: Philip Oakley <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
Continue walking the code path for the >4GB `hash-object --literally`
test to the hash algorithm step for LLP64 systems.

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

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

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

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

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

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

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

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

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

Signed-off-by: Philip Oakley <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
To complement the `--stdin` and `--literally` test cases that verify
that we can hash files larger than 4GB on 64-bit platforms using the
LLP64 data model, here is a test case that exercises `hash-object`
_without_ any options.

Just as before, we use the `big` file from the previous test case if it
exists to save on setup time, otherwise generate it.

Signed-off-by: Philip Oakley <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
To verify that the `clean` side of the `clean`/`smudge` filter code is
correct with regards to LLP64 (read: to ensure that `size_t` is used
instead of `unsigned long`), here is a test case using a trivial filter,
specifically _not_ writing anything to the object store to limit the
scope of the test case.

As in previous commits, the `big` file from previous test cases is
reused if available, to save setup time, otherwise re-generated.

Signed-off-by: Philip Oakley <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
In the case of Git for Windows (say, in a Git Bash window) running in a
Windows Subsystem for Linux (WSL) directory, the GetNamedSecurityInfoW()
call in is_path_owned_By_current_side() returns an error code other than
ERROR_SUCCESS. This is consistent behavior across this boundary.

In these cases, the owner would always be different because the WSL
owner is a different entity than the Windows user.

The change here is to suppress the error message that looks like this:

  error: failed to get owner for '//wsl.localhost/...' (1)

Before this change, this warning happens for every Git command,
regardless of whether the directory is marked with safe.directory.

Signed-off-by: Derrick Stolee <[email protected]>
For Windows builds >= 15063 set $env:TERM to "xterm-256color" instead of
"cygwin" because they have a more capable console system that supports
this. Also set $env:COLORTERM="truecolor" if unset.

$env:TERM is initialized so that ANSI colors in color.c work, see
29a3963 (Win32: patch Windows environment on startup, 2012-01-15).

See #3629 regarding problems caused by always setting
$env:TERM="cygwin".

This is the same heuristic used by the Cygwin runtime.

Signed-off-by: Rafael Kitover <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
NtQueryObject under Wine can return a success but fill out no name.
In those situations, Wine will set Buffer to NULL, and set result to
the sizeof(OBJECT_NAME_INFORMATION).

Running a command such as

echo "$(git.exe --version 2>/dev/null)"

will crash due to a NULL pointer dereference when the code attempts to
null terminate the buffer, although, weirdly, removing the subshell or
redirecting stdout to a file will not trigger the crash.

Code has been added to also check Buffer and Length to ensure the check
is as robust as possible due to the current behavior being fragile at
best, and could potentially change in the future

This code is based on the behavior of NtQueryObject under wine and
reactos.

Signed-off-by: Christopher Degawa <[email protected]>
Atomic append on windows is only supported on local disk files, and it may
cause errors in other situations, e.g. network file system. If that is the
case, this config option should be used to turn atomic append off.

Co-Authored-By: Johannes Schindelin <[email protected]>
Signed-off-by: 孙卓识 <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
From the documentation of said setting:

	This boolean will enable fsync() when writing object files.

	This is a total waste of time and effort on a filesystem that
	orders data writes properly, but can be useful for filesystems
	that do not use journalling (traditional UNIX filesystems) or
	that only journal metadata and not file contents (OS X’s HFS+,
	or Linux ext3 with "data=writeback").

The most common file system on Windows (NTFS) does not guarantee that
order, therefore a sudden loss of power (or any other event causing an
unclean shutdown) would cause corrupt files (i.e. files filled with
NULs). Therefore we need to change the default.

Note that the documentation makes it sound as if this causes really bad
performance. In reality, writing loose objects is something that is done
only rarely, and only a handful of files at a time.

Signed-off-by: Johannes Schindelin <[email protected]>
Whith Windows 2000, Microsoft introduced a flag to the PE header to mark executables as
"terminal server aware". Windows terminal servers provide a redirected Windows directory and
redirected registry hives when launching legacy applications without this flag set. Since we
do not use any INI files in the Windows directory and don't write to the registry, we don't
need  this additional preparation. Telling the OS that we don't need this should provide
slightly improved startup times in terminal server environments.

When building for supported Windows Versions with MSVC the /TSAWARE linker flag is
automatically set, but MinGW requires us to set the --tsaware flag manually.

This partially addresses #3935.

Signed-off-by: Matthias Aßhauer <[email protected]>
Add FileVersion, which is a required field
As not all required fields were present, none were being included
Fixes #4090

Signed-off-by: Kiel Hurley <[email protected]>
In f9b7573 (repository: free fields before overwriting them,
2017-09-05), Git was taught to release memory before overwriting it, but
357a03e (repository.c: move env-related setup code back to
environment.c, 2018-03-03) changed the code so that it would not
_always_ be overwritten.

As a consequence, the `commondir` attribute would point to
already-free()d memory.

This seems not to cause problems in core Git, but there are add-on
patches in Git for Windows where the `commondir` attribute is
subsequently used and causing invalid memory accesses e.g. in setups
containing old-style submodules (i.e. the ones with a `.git` directory
within theirs worktrees) that have `commondir` configured.

This fixes #4083.

Signed-off-by: Andrey Zabavnikov <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
This compile-time option allows to ask Git to load libcurl dynamically
at runtime.

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

Signed-off-by: Johannes Schindelin <[email protected]>
This implements the Windows-specific support code, because everything is
slightly different on Windows, even loading shared libraries.

Note: I specifically do _not_ use the code from
`compat/win32/lazyload.h` here because that code is optimized for
loading individual functions from various system DLLs, while we
specifically want to load _many_ functions from _one_ DLL here, and
distinctly not a system DLL (we expect libcurl to be located outside
`C:\Windows\system32`, something `INIT_PROC_ADDR` refuses to work with).
Also, the `curl_easy_getinfo()`/`curl_easy_setopt()` functions are
declared as vararg functions, which `lazyload.h` cannot handle. Finally,
we are about to optionally override the exact file name that is to be
loaded, which is a goal contrary to `lazyload.h`'s design.

Signed-off-by: Johannes Schindelin <[email protected]>
The previous commits introduced a compile-time option to load libcurl
lazily, but it uses the hard-coded name "libcurl-4.dll" (or equivalent
on platforms other than Windows).

To allow for installing multiple libcurl flavors side by side, where
each supports one specific SSL/TLS backend, let's first look whether
`libcurl-<backend>-4.dll` exists, and only use `libcurl-4.dll` as a fall
back.

That will allow us to ship with a libcurl by default that only supports
the Secure Channel backend for the `https://` protocol. This libcurl
won't suffer from any dependency problem when upgrading OpenSSL to a new
major version (which will change the DLL name, and hence break every
program and library that depends on it).

This is crucial because Git for Windows relies on libcurl to keep
working when building and deploying a new OpenSSL package because that
library is used by `git fetch` and `git clone`.

Note that this feature is by no means specific to Windows. On Ubuntu,
for example, a `git` built using `LAZY_LOAD_LIBCURL` will use
`libcurl.so.4` for `http.sslbackend=openssl` and `libcurl-gnutls.so.4`
for `http.sslbackend=gnutls`.

Signed-off-by: Johannes Schindelin <[email protected]>
It is merely a historical wart that, say, `git-commit` exists in the
`libexec/git-core/` directory, a tribute to the original idea to let Git
be essentially a bunch of Unix shell scripts revolving around very few
"plumbing" (AKA low-level) commands.

Git has evolved a lot from there. These days, most of Git's
functionality is contained within the `git` executable, in the form of
"built-in" commands.

To accommodate for scripts that use the "dashed" form of Git commands,
even today, Git provides hard-links that make the `git` executable
available as, say, `git-commit`, just in case that an old script has not
been updated to invoke `git commit`.

Those hard-links do not come cheap: they take about half a minute for
every build of Git on Windows, they are mistaken for taking up huge
amounts of space by some Windows Explorer versions that do not
understand hard-links, and therefore many a "bug" report had to be
addressed.

The "dashed form" has been officially deprecated in Git version 1.5.4,
which was released on February 2nd, 2008, i.e. a very long time ago.
This deprecation was never finalized by skipping these hard-links, but
we can start the process now, in Git for Windows.

Signed-off-by: Johannes Schindelin <[email protected]>
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 <[email protected]>
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 <[email protected]>
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
#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 <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
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 <[email protected]>
dscho and others added 12 commits October 16, 2025 15:22
This was pull request #1645 from ZCube/master

Support windows container.

Signed-off-by: Johannes Schindelin <[email protected]>
With this patch, Git for Windows works as intended on mounted APFS
volumes (where renaming read-only files would fail).

Signed-off-by: Johannes Schindelin <[email protected]>
Specify symlink type in .gitattributes
Signed-off-by: Johannes Schindelin <[email protected]>
This patch introduces support to set special NTFS attributes that are
interpreted by the Windows Subsystem for Linux as file mode bits, UID
and GID.

Signed-off-by: Johannes Schindelin <[email protected]>
Handle Ctrl+C in Git Bash nicely

Signed-off-by: Johannes Schindelin <[email protected]>
Switch to batched fsync by default
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Start monitoring updates of Git for Windows' component in the open
Add a README.md for GitHub goodness.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho force-pushed the rebase-to-v2.51.1 branch from 4fdf899 to 1ed9925 Compare October 16, 2025 13:23
@dscho
Copy link
Member Author

dscho commented Oct 16, 2025

  • 256: 3a45c7b (upstream: 3a45c7b) ! 4: bc694df midx-write: put failing response value back

    @@ midx-write.c: static int write_midx_internal(struct repository *r, const char *o
      		goto cleanup;
      	}
      
    -
    - ## t/t5319-multi-pack-index.sh ##
    -@@ t/t5319-multi-pack-index.sh: test_expect_success 'load reverse index when missing .idx, .pack' '
    - 		mv $idx.bak $idx &&
    - 
    - 		mv $pack $pack.bak &&
    --		git cat-file --batch-check="%(objectsize:disk)" <tip
    -+		git cat-file --batch-check="%(objectsize:disk)" <tip &&
    -+
    -+		test_must_fail git multi-pack-index write 2>err &&
    -+		test_grep "could not load pack" err
    - 	)
    - '
    - 
  • -: ------------ > 5: 82f355b midx-write: simplify error cases

@mjcheetham pointed out that these two remaining commits are bogus (the first one adds a line result = 1; which the second one removes. I dropped both.

Range-diff
  • 1: bc694df < -: ------------ midx-write: put failing response value back
  • 2: 82f355b < -: ------------ midx-write: simplify error cases
  • 3: 0fa5b24 = 1: ded8bd2 diff --no-index: fix logic for paths ending in '/'
  • 4: 8e5ea51 = 2: 3651c88 diff --no-index: fix logic for paths ending in '/'
  • 5: 85e4e72 = 3: 48435ab unix-socket: avoid leak when initialization fails
  • 6: 3822ff4 = 4: bb0102b grep: prevent ^$ false match at end of file
  • 9: 94a01e4 = 5: 316faee mingw: avoid relative #includes
  • 7: 6ba9c89 = 6: 4588375 t9350: point out that refs are not updated correctly
  • 13: a692add = 7: 1bbb319 mingw: order #includes alphabetically
  • 8: b90ec50 = 8: 5f12931 transport-helper: add trailing --
  • 10: 5a6f1a3 = 9: e27d637 remote-helper: check helper status after import/export
  • 11: 6024420 = 10: a5b418d mingw: demonstrate a problem with certain absolute paths
  • 12: f2a9da6 = 11: ffd4415 clean: do not traverse mount points
  • 14: b93cb4a = 12: f99d039 Always auto-gc after calling a fast-import transport
  • 15: ccbba20 = 13: 61c8819 mingw: allow absolute paths without drive prefix
  • 16: cbb12fe = 14: 486ff9f mingw: include the Python parts in the build
  • 23: 6f4884e = 15: 1383cee clean: remove mount points when possible
  • 17: e55b985 = 16: 99b54d1 win32/pthread: avoid name clashes with winpthread
  • 18: d66f7cb = 17: b1d2e3a git-compat-util: avoid redeclaring _DEFAULT_SOURCE
  • 19: 160752b = 18: 6cd8261 Import the source code of mimalloc v2.2.4
  • 20: 98e8ee3 = 19: 17d669f mimalloc: adjust for building inside Git
  • 21: d5d26b3 = 20: 54b2555 mimalloc: offer a build-time option to enable it
  • 22: 0e9a581 = 21: 6bb96ff mingw: use mimalloc
  • 26: 54fa376 = 22: 32008da transport: optionally disable side-band-64k
  • 27: abf240e = 23: b523461 mingw: do resolve symlinks in getcwd()
  • 28: 5004629 = 24: 7c50535 mingw: fix fatal error working on mapped network drives on Windows
  • 31: abca302 = 25: 4e89f15 mingw: ensure valid CTYPE
  • 24: 644a62f = 26: f4fedf9 mingw: demonstrate a git add issue with NTFS junctions
  • 33: ccd163a = 27: 96a39ed mingw: allow git.exe to be used instead of the "Git wrapper"
  • 25: a037d28 = 28: a8fdf07 strbuf_realpath(): use platform-dependent API if available
  • 35: 82a9305 = 29: e1faeb2 mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory
  • 36: 9a076a4 = 30: 7a53378 http: use new "best effort" strategy for Secure Channel revoke checking
  • 29: 0d11719 = 31: 81ad143 clink.pl: fix MSVC compile script to handle libcurl-d.lib
  • 30: 96ee7d8 = 32: f0e3e10 mingw: implement a platform-specific strbuf_realpath()
  • 32: b5c9858 = 33: ee4dab2 t5505/t5516: allow running without .git/branches/ in the templates
  • 34: f5e84a5 = 34: 52468a9 t5505/t5516: fix white-space around redirectors
  • 37: da8f5fa = 35: 9b44f80 t3701: verify that we can add lots of files interactively
  • 42: d986f04 = 36: dc25fb7 commit: accept "scissors" with CR/LF line endings
  • 43: 7d51e7f = 37: 06cc302 t0014: fix indentation
  • 44: f0aa5b4 = 38: 48a6af3 git-gui: accommodate for intent-to-add files
  • 38: 8d986a5 = 39: db5e4c4 clink.pl: fix libexpatd.lib link error when using MSVC
  • 39: b2ec027 = 40: 9653b88 Makefile: clean up .ilk files when MSVC=1
  • 40: f0b8a4b = 41: 8c18902 vcbuild: add support for compiling Windows resource files
  • 45: d87d409 = 42: de11061 vcpkg_install: detect lack of Git
  • 41: 66da5b4 = 43: 67e9a44 config.mak.uname: add git.rc to MSVC builds
  • 46: fe37b42 = 44: d712104 vcpkg_install: add comment regarding slow network connections
  • 50: eb80649 = 45: 7ce07e4 clink.pl: ignore no-stack-protector arg on MSVC=1 builds
  • 47: 2caabf7 = 46: cf7c13c vcbuild: install ARM64 dependencies when building ARM64 binaries
  • 52: 2d19780 = 47: 470f776 clink.pl: move default linker options for MSVC=1 builds
  • 48: 676b05d = 48: f3f4d70 vcbuild: add an option to install individual 'features'
  • 54: bc8c558 = 49: c136430 cmake: install headless-git.
  • 49: 6a0df04 = 50: 4f03e2c cmake: allow building for Windows/ARM64
  • 51: 5b726d1 = 51: 9cdf047 ci(vs-build) also build Windows/ARM64 artifacts
  • 53: bfce0cd = 52: 2199733 Add schannel to curl installation
  • 55: e801eba = 53: 41836ed cmake(): allow setting HOST_CPU for cross-compilation
  • 57: d7874e9 = 54: 0eb4b00 subtree: update contrib/subtree test target
  • 59: 5627dd4 = 55: d312c23 mingw: allow for longer paths in parse_interpreter()
  • 60: dee2579 = 56: 182c1ce compat/vcbuild: document preferred way to build in Visual Studio
  • 61: 533f639 = 57: acb01ce http: optionally send SSL client certificate
  • 56: 1eaa485 = 58: 2e7b2db CMake: default Visual Studio generator has changed
  • 58: 49eaf15 = 59: d6a51fb .gitignore: add Visual Studio CMakeSetting.json file
  • 67: 3cd642d = 60: cd69d2e CMakeLists: add default "x64-windows" arch for Visual Studio
  • 62: 86288df = 61: 4ba9ed3 ci: run contrib/subtree tests in CI builds
  • 69: 2bbf5ab = 62: fbd644e CMake: show Win32 and Generator_platform build-option values
  • 70: 32c4c8e = 63: 55c4198 init: do parse all core.* settings early
  • 63: 3e4a5d7 = 64: a41c95f hash-object: demonstrate a >4GB/LLP64 problem
  • 64: 3eb6f06 = 65: 4d4c3ce object-file.c: use size_t for header lengths
  • 65: c765195 = 66: 8a999e2 hash algorithms: use size_t for section lengths
  • 66: f1c0bd8 = 67: dc59943 hash-object --stdin: verify that it works with >4GB/LLP64
  • 68: 0a69d17 = 68: a022cf1 hash-object: add another >4GB/LLP64 test case
  • 72: 71f5315 = 69: 48ec2cf setup: properly use "%(prefix)/" when in WSL
  • 71: c5d1823 = 70: 520110d hash-object: add a >4GB/LLP64 test case using filtered input
  • 74: 01ffe83 = 71: a85964f compat/mingw.c: do not warn when failing to get owner
  • 73: 5a39f31 = 72: b994e76 Add config option windows.appendAtomically
  • 77: 1fc2a53 = 73: d21cf28 MinGW: link as terminal server aware
  • 75: b085be0 = 74: b9ed276 mingw: $env:TERM="xterm-256color" for newer OSes
  • 76: 5ecdd28 = 75: 6905977 winansi: check result and Buffer before using Name
  • 78: 9d92a61 = 76: ebe433c mingw: change core.fsyncObjectFiles = 1 by default
  • 79: 76e81f5 = 77: 4cd2742 Fix Windows version resources
  • 80: 68b966d = 78: 5f60a84 status: fix for old-style submodules with commondir
  • 81: 1c59852 = 79: 6c106de http: optionally load libcurl lazily
  • 82: 4d51ef9 = 80: b4ae94b http: support lazy-loading libcurl also on Windows
  • 83: f60fe4f = 81: 20c7fe9 http: when loading libcurl lazily, allow for multiple SSL backends
  • 84: af53ab7 = 82: ebb9668 windows: skip linking git-<command> for built-ins
  • 85: bedd6f5 = 83: 311a237 mingw: do load libcurl dynamically by default
  • 86: 0573808 = 84: 6ce01ae Add a GitHub workflow to verify that Git/Scalar work in Nano Server
  • 87: e61df86 = 85: 439ff95 mingw: suggest windows.appendAtomically in more cases
  • 88: 6521dfe = 86: d8834e2 win32: use native ANSI sequence processing, if possible
  • 89: e8d926b = 87: a082fa0 git.rc: include winuser.h
  • 90: 091c009 = 88: d8c36b4 common-main.c: fflush stdout buffer upon exit
  • 91: ddef55d = 89: 31648e8 t5601/t7406(mingw): do run tests with symlink support
  • 93: 725ab70 = 90: 366e52a ci: work around a problem with HTTP/2 vs libcurl v8.10.0
  • 94: f95b614 = 91: d43207f revision: create mark_trees_uninteresting_dense()
  • 95: ab41ffb = 92: 9739217 survey: stub in new experimental 'git-survey' command
  • 96: cc887eb = 93: 97b7e6c survey: add command line opts to select references
  • 92: 66e52ed = 94: 7cdd124 win32: ensure that localtime_r() is declared even in i686 builds
  • 97: 8b1e05e = 95: 18dcf0f Fallback to AppData if XDG_CONFIG_HOME is unset
  • 98: 61481ec = 96: f34b55f run-command: be helpful with Git LFS fails on Windows 7
  • 99: f3076ef = 97: 3517950 survey: start pretty printing data in table form
  • 100: af59487 = 98: 3fb91e9 survey: add object count summary
  • 101: 2df4836 = 99: 48e88cc survey: summarize total sizes by object type
  • 102: a2f2640 = 100: 67cb37e survey: show progress during object walk
  • 103: 38d677b = 101: 8d289b6 survey: add ability to track prioritized lists
  • 104: 982e87d = 102: 8f9f1e8 survey: add report of "largest" paths
  • 106: 9448fb8 = 103: 1bf6d19 survey: add --top= option and config
  • 105: fc26d15 = 104: d6e28bd mingw: make sure errno is set correctly when socket operations fail
  • 108: 0faed2f = 105: 40d6f8b survey: clearly note the experimental nature in the output
  • 107: 8370da3 = 106: 2895407 compat/mingw: handle WSA errors in strerror
  • 109: 589d630 = 107: bc9d921 compat/mingw: drop outdated comment
  • 110: ded6dae = 108: 60c8674 t0301: actually test credential-cache on Windows
  • 111: cb16d82 = 109: 00bae2c credential-cache: handle ECONNREFUSED gracefully
  • 112: d6d7cb5 = 110: bba5cb9 max_tree_depth: lower it for clangarm64 on Windows
  • 113: b8cb26b = 111: a7ae963 reftable: do make sure to use custom allocators
  • 114: f5b90e6 = 112: bfea0fa check-whitespace: avoid alerts about upstream commits
  • 117: f5cb01d = 113: f5795a6 build(deps): bump actions/download-artifact from 4 to 5
  • 118: 4319f4c = 114: 5ace416 build(deps): bump actions/checkout from 4 to 5
  • 119: 4831c82 = 115: bb1fd4e build(deps): bump actions/setup-python from 5 to 6
  • 115: 8d4cda4 = 116: 2f600b0 refs: forbid clang to complain about unreachable code
  • 116: 353ee00 = 117: 8ae6103 mingw: avoid the comma operator
  • 120: fdc7355 = 118: 75ff1cb wincred: Avoid memory corruption
  • 121: cd05768 = 119: 538ad53 build(deps): bump actions/github-script from 7 to 8
  • 122: 76ecb4b = 120: d9079a1 git-gui: provide question helper for retry fallback on Windows
  • 123: 26534fa = 121: f08d555 git gui: set GIT_ASKPASS=git-gui--askpass if not set yet
  • 124: d0df367 = 122: 841a8cf git-gui--askyesno: fix funny text wrapping
  • 125: 7cc4b46 = 123: 54a32ad git-gui--askyesno: allow overriding the window title
  • 126: 01c225a = 124: ccd4de7 git-gui--askyesno (mingw): use Git for Windows' icon, if available
  • 127: 3fb511e = 125: a3a5cf7 Win32: make FILETIME conversion functions public
  • 128: e853e72 = 126: ac61f86 Win32: dirent.c: Move opendir down
  • 129: baef1c5 = 127: 4ad5b9f mingw: make the dirent implementation pluggable
  • 130: b2f7dda = 128: ccf6735 Win32: make the lstat implementation pluggable
  • 131: 9724770 = 129: f6efc8f mingw: add infrastructure for read-only file system level caches
  • 132: 98068d6 = 130: 6a0b97b mingw: add a cache below mingw's lstat and dirent implementations
  • 133: 4799789 = 131: 3d9d6c9 fscache: load directories only once
  • 134: aaed016 = 132: 47fd248 fscache: add key for GIT_TRACE_FSCACHE
  • 135: 451173d = 133: d21c8a2 fscache: remember not-found directories
  • 136: 6456f06 = 134: 76b5215 fscache: add a test for the dir-not-found optimization
  • 137: b5240fd = 135: 3611e47 add: use preload-index and fscache for performance
  • 138: c6cf824 = 136: c02f837 dir.c: make add_excludes aware of fscache during status
  • 139: 8472521 = 137: 8b4f850 fscache: make fscache_enabled() public
  • 140: 9d49980 = 138: 5dc8883 dir.c: regression fix for add_excludes with fscache
  • 141: 2097a61 = 139: db0d6ee fetch-pack.c: enable fscache for stats under .git/objects
  • 142: 674bd2b = 140: 12fcd60 checkout.c: enable fscache for checkout again
  • 143: e2ed9b1 = 141: 4b2e017 Enable the filesystem cache (fscache) in refresh_index().
  • 144: 4432910 = 142: 4f1208d fscache: use FindFirstFileExW to avoid retrieving the short name
  • 145: 5bab135 = 143: c41e8c7 fscache: add GIT_TEST_FSCACHE support
  • 146: d720773 = 144: 1441685 fscache: add fscache hit statistics
  • 147: 82aca9f = 145: ff0bc42 unpack-trees: enable fscache for sparse-checkout
  • 148: fcc8fea = 146: 3a93731 status: disable and free fscache at the end of the status command
  • 149: 264cfe0 = 147: 75dbe44 mem_pool: add GIT_TRACE_MEMPOOL support
  • 150: 87f42f8 = 148: 0f600cf fscache: fscache takes an initial size
  • 151: 86bb559 = 149: e7c83f3 fscache: update fscache to be thread specific instead of global
  • 152: 759bb0e = 150: fc2411a fscache: teach fscache to use mempool
  • 153: bc95529 = 151: 0bc75d5 fscache: make fscache_enable() thread safe
  • 154: d13e0f5 = 152: 8a2350f fscache: teach fscache to use NtQueryDirectoryFile
  • 155: 05dcb89 = 153: 4a1d719 fscache: remember the reparse tag for each entry
  • 156: e0fa2ca = 154: 35c5d66 fscache: implement an FSCache-aware is_mount_point()
  • 157: 75fe02f = 155: ebeac48 clean: make use of FSCache
  • 158: b0fd6ca = 156: 56c269a pack-objects (mingw): demonstrate a segmentation fault with large deltas
  • 159: a2b2d62 = 157: 34fff13 mingw: support long paths
  • 160: 7b455b0 = 158: cec4a54 Win32: fix 'lstat("dir/")' with long paths
  • 161: 748b499 = 159: dd2a6db win32(long path support): leave drive-less absolute paths intact
  • 162: d609018 = 160: ac563d5 compat/fsmonitor/fsm-*-win32: support long paths
  • 163: 00cb9bf = 161: 9e5cedd clean: suggest using core.longPaths if paths are too long to remove
  • 164: e2d1918 = 162: 8791d96 mingw: Support git_terminal_prompt with more terminals
  • 165: 1cabe9b = 163: 5c1d475 compat/terminal.c: only use the Windows console if bash 'read -r' fails
  • 166: abe0d6e = 164: d40863f mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
  • 167: 0eef90b = 165: 2a51817 strbuf_readlink: don't call readlink twice if hint is the exact link size
  • 168: cf39bec = 166: 09d0069 strbuf_readlink: support link targets that exceed PATH_MAX
  • 169: 8ac2707 = 167: 5482c12 lockfile.c: use is_dir_sep() instead of hardcoded '/' checks
  • 170: 514c8dc = 168: 2c4498e Win32: don't call GetFileAttributes twice in mingw_lstat()
  • 171: 4fb0dfd = 169: ceff3e9 Win32: implement stat() with symlink support
  • 172: 08f323b = 170: 2a9d291 Win32: remove separate do_lstat() function
  • 173: 48c19d1 = 171: 31d9e0c Win32: let mingw_lstat() error early upon problems with reparse points
  • 174: 9e198f2 = 172: 3ce727d mingw: teach fscache and dirent about symlinks
  • 175: ea782d9 = 173: 0a615a7 Win32: lstat(): return adequate stat.st_size for symlinks
  • 176: 55b9631 = 174: 652fb8c Win32: factor out retry logic
  • 177: 8b0a6d5 = 175: b775870 Win32: change default of 'core.symlinks' to false
  • 178: 1a1557d = 176: 68c198c Win32: add symlink-specific error codes
  • 179: b860683 = 177: 917b2cf Win32: mingw_unlink: support symlinks to directories
  • 180: d5d7bba = 178: 213dc02 Win32: mingw_rename: support renaming symlinks
  • 181: 723f729 = 179: c784540 Win32: mingw_chdir: change to symlink-resolved directory
  • 182: e3bfcbd = 180: 5adf32b Win32: implement readlink()
  • 183: 3c336fa = 181: 633192b mingw: lstat: compute correct size for symlinks
  • 184: da89715 = 182: 605e9f1 Win32: implement basic symlink() functionality (file symlinks only)
  • 185: 9003325 = 183: 75f5522 Win32: symlink: add support for symlinks to directories
  • 186: 8ea5ab2 = 184: 21d1546 mingw: try to create symlinks without elevated permissions
  • 187: b5ee532 = 185: cb31c87 mingw: emulate stat() a little more faithfully
  • 188: 1f8ac7d = 186: 5c2db36 mingw: special-case index entries for symlinks with buggy size
  • 189: e34f912 = 187: 05959e7 mingw: introduce code to detect whether we're inside a Windows container
  • 191: 140b829 = 188: 83d0523 mingw: when running in a Windows container, try to rename() harder
  • 193: 484fe73 = 189: 90d1fe6 mingw: move the file_attr_to_st_mode() function definition
  • 190: 152a379 = 190: 3c3314b Win32: symlink: move phantom symlink creation to a separate function
  • 195: 8cba656 = 191: f5b4b2e mingw: Windows Docker volumes are not symbolic links
  • 192: 4078d60 = 192: 5f1a64f Introduce helper to create symlinks that knows about index_state
  • 197: 00d6f8e = 193: 30315d3 mingw: work around rename() failing on a read-only file
  • 194: ad06096 = 194: c02e516 mingw: allow to specify the symlink type in .gitattributes
  • 196: 42a4443 = 195: 5dc3a4a Win32: symlink: add test for symlink attribute
  • 198: 0ebb6df = 196: 659bf91 mingw: explicitly specify with which cmd to prefix the cmdline
  • 199: 1fd3d14 = 197: de7a140 mingw: when path_lookup() failed, try BusyBox
  • 200: 92ca01f = 198: 3ef3784 test-tool: learn to act as a drop-in replacement for iconv
  • 201: 6e29ad4 = 199: 71e5b61 tests(mingw): if iconv is unavailable, use test-helper --iconv
  • 202: f0d41e2 = 200: e2e498f gitattributes: mark .png files as binary
  • 203: 33b25e0 = 201: 328f004 tests: move test PNGs into t/lib-diff/
  • 204: 12c8263 = 202: d22cc90 tests: only override sort & find if there are usable ones in /usr/bin/
  • 205: 709569c = 203: 9134e18 tests: use the correct path separator with BusyBox
  • 206: 7c4c938 = 204: ac51eb9 mingw: only use Bash-ism builtin pwd -W when available
  • 207: cb5b068 = 205: 7dff0b8 tests (mingw): remove Bash-specific pwd option
  • 208: f5adc8b = 206: 4a8a923 test-lib: add BUSYBOX prerequisite
  • 209: 109d84b = 207: 111651a t5003: use binary file from t/lib-diff/
  • 210: 5e1b28c = 208: 2173ca2 t5532: workaround for BusyBox on Windows
  • 211: f1a5833 = 209: 5d0f5c7 t5605: special-case hardlink test for BusyBox-w32
  • 212: a232f67 = 210: ab38fed t5813: allow for $PWD to be a Windows path
  • 213: 8328724 = 211: 062f413 t9200: skip tests when $PWD contains a colon
  • 214: 5446c6b = 212: 4ff171f mingw: add a Makefile target to copy test artifacts
  • 217: cc39079 = 213: b381054 mingw: optionally enable wsl compability file mode bits
  • 215: 0c33717 = 214: cb4350c mingw: kill child processes in a gentler way
  • 216: 021b371 = 215: 559b906 mingw: do not call xutftowcs_path in mingw_mktemp
  • 218: c42cd90 = 216: 9d0703f mingw: really handle SIGINT
  • 220: 6821b4a = 217: f37aaab Partially un-revert "editor: save and reset terminal after calling EDITOR"
  • 221: ba30dde = 218: 5e4a83a reset: reinstate support for the deprecated --stdin option
  • 224: 635c8a6 = 219: 39be204 Describe Git for Windows' architecture [no ci]
  • 225: 2fa8960 = 220: 6d96a5f Modify the Code of Conduct for Git for Windows
  • 226: bbbd84a = 221: 656f8f7 CONTRIBUTING.md: add guide for first-time contributors
  • 227: feaab8e = 222: 5d0e310 README.md: Add a Windows-specific preamble
  • 228: df92d77 = 223: 56ea327 Add an issue template
  • 219: 3d919d9 = 224: d131409 Add a GitHub workflow to monitor component updates
  • 229: 4267814 = 225: 5b39bc0 Modify the GitHub Pull Request template (to reflect Git for Windows)
  • 222: a8ae165 = 226: caf5d0d fsmonitor: reintroduce core.useBuiltinFSMonitor
  • 223: 6853aa5 = 227: 9123088 dependabot: help keeping GitHub Actions versions up to date
  • 230: 4fc0c1b = 228: 2b704ab SECURITY.md: document Git for Windows' policies

@dscho
Copy link
Member Author

dscho commented Oct 16, 2025

... and the first bug in v2.51.1 has been reported. I'll wait for confirmation that the fix is good, then integrate it, before releasing Git for Windows v2.51.1.

@fcharlie
Copy link

Another reported BUG:

https://public-inbox.org/git/CACJRbWjwOQwJB13CwTfvhV3p+Hbn4KrNM9AtBanGtUS4V_1MbQ@mail.gmail.com/T/#u

@dscho
Copy link
Member Author

dscho commented Oct 17, 2025

Another reported BUG:

https://public-inbox.org/git/CACJRbWjwOQwJB13CwTfvhV3p+Hbn4KrNM9AtBanGtUS4V_1MbQ@mail.gmail.com/T/#u

@fcharlie Is this another bug, or is it covered by the same fix? I guess there might be more to it (haven't had the time to read the report, patch and discussion in detail yet), as there is another patch on the list now (that seems to be intended to augment, rather than replace, the first fix).

@dscho dscho linked an issue Oct 17, 2025 that may be closed by this pull request
@fcharlie
Copy link

[New git version] v2.51.1 #5887

This is reported as two BUGs, but seems to be related?

@dscho
Copy link
Member Author

dscho commented Oct 17, 2025

[New git version] v2.51.1 #5887

This is reported as two BUGs, but seems to be related?

Indeed. The report about git diff --quiet HEAD talks about a code path that enters this code block:

	if (output_format & DIFF_FORMAT_NO_OUTPUT &&
	    options->flags.exit_with_status &&
	    options->flags.diff_from_contents) {
		for (i = 0; i < q->nr; i++) {
			struct diff_filepair *p = q->queue[i];
			if (check_pair_status(p))
				diff_flush_patch_quietly(p, options);
			if (options->found_changes)
				break;
		}
	}

Specifically, the diff_flush_patch_quietly() function is called, which sets the dry_run flag. Later on, the emit_diff_symbol_from_struct() function is entered. Here is the call stack:

#0  emit_diff_symbol_from_struct (o=0x5ff480, eds=0x5fe910) at diff.c:1355
#1  0x00007ff7c3b275fe in emit_diff_symbol (o=0x5ff480, s=DIFF_SYMBOL_HEADER,
    line=0x3561a010380 "\033[1mdiff --git a/file b/file\033[m\n\033[1mnew file mode 100644\033[m\n\033[1mindex 0000000..e69de29\033[m\n", len=90, flags=0) at diff.c:1597
#2  0x00007ff7c3b2d602 in builtin_diff (name_a=0x3561a0702a0 "file", name_b=0x3561a0702a0 "file", one=0x3561a070240,
    two=0x3561a0702b0, xfrm_msg=0x3561a1a0500 "\033[1mindex 0000000..e69de29\033[m\n", must_show_header=1, o=0x5ff480,
    complete_rewrite=0) at diff.c:3723
#3  0x00007ff7c3b2fdc6 in run_diff_cmd (pgm=0x0, name=0x3561a0702a0 "file", other=0x0, attr_path=0x3561a0702a0 "file",
    one=0x3561a070240, two=0x3561a0702b0, msg=0x5febf0, o=0x5ff480, p=0x3561a0220c0) at diff.c:4617
#4  0x00007ff7c3b302af in run_diff (p=0x3561a0220c0, o=0x5ff480) at diff.c:4711
#5  0x00007ff7c3b353b0 in diff_flush_patch (p=0x3561a0220c0, o=0x5ff480) at diff.c:6172
#6  0x00007ff7c3b35413 in diff_flush_patch_quietly (p=0x3561a0220c0, o=0x5ff480) at diff.c:6184
#7  0x00007ff7c3b372ec in diff_flush (options=0x5ff480) at diff.c:6882
#8  0x00007ff7c3b2134f in run_diff_index (revs=0x5feed0, option=0) at diff-lib.c:643
#9  0x00007ff7c39d8427 in builtin_diff_index (revs=0x5feed0, argc=1, argv=0x3561a0202a0) at builtin/diff.c:170
#10 0x00007ff7c39d9487 in cmd_diff (argc=1, argv=0x3561a0202a0, prefix=0x0, repo=0x0) at builtin/diff.c:633
#11 0x00007ff7c39932f0 in run_builtin (p=0x7ff7c3d46368 <commands+840>, argc=3, argv=0x3561a0202a0,
    repo=0x7ff7c3e742c0 <the_repo>) at git.c:506
#12 0x00007ff7c3993849 in handle_builtin (args=0x5ffd70) at git.c:778
#13 0x00007ff7c3993b04 in run_argv (args=0x5ffd70) at git.c:861
#14 0x00007ff7c3993f56 in cmd_main (argc=3, argv=0x3561a0300e0) at git.c:983
#15 0x00007ff7c3ab0a7e in main (argc=7, argv=0x3561a0300c0) at common-main.c:9

The if (o->dry_run) return; guard introduced in the fix will then suppress the output, as desired.

brandb97 and others added 2 commits October 17, 2025 14:10
In dry run mode, diff_flush_patch() should not produce any output.
However, in commit b55e6d3 (diff: ensure consistent diff behavior
with ignore options, 2025-08-08), only the output during the
comparison of two file contents was suppressed. For file deletions
or mode changes, diff_flush_patch() still produces output. In
run_extern_diff(), set quiet to true if in dry run mode. In
emit_diff_symbol_from_struct(), directly return if in dry run mode.

Signed-off-by: Lidong Yan <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
Note: This is _not_ strictly necessary, but adds a layer of protection
against bugs similar to the one that was reported very quickly after Git
v2.51.1 was released, one time via
https://lore.kernel.org/git/CACJRbWjwOQwJB13CwTfvhV3p+Hbn4KrNM9AtBanGtUS4V_1MbQ@mail.gmail.com/
and one time via
https://lore.kernel.org/git/[email protected]/.

In --quiet mode, since we produce only an exit code for "something was
changed" and no actual output, we can often get by with just a
tree-level diff. However, certain options require us to actually look at
the file contents (e.g., if we are ignoring whitespace changes). We have
a flag "diff_from_contents" for that, and if it is set we call
diff_flush() on each path.

To avoid producing any output (since we were asked to be --quiet), we
traditionally just redirected the output to /dev/null. That changed in
b55e6d3 (diff: ensure consistent diff behavior with ignore options,
2025-08-08), which replaced that with a "dry_run" flag. In theory, with
dry_run set, we should produce no output. But it carries a risk of
regression: if we forget to respect dry_run in any of the output paths,
we'll accidentally produce output.

And indeed, there is at least one such regression in that commit, as it
covered only the case where we actually call into xdiff, and not
creation or deletion diffs, where we manually generate the headers. We
even test this case in t4035, but only with diff-tree, which does not
show the bug by default because it does not require diff_from_contents.
But git-diff does, because it allows external diff programs by default
(so we must dig into each diff filepair to decide if it requires running
an external diff that may declare two distinct blobs to actually be the
same).

We should fix all of those code paths to respect dry_run correctly, but
in the meantime we can protect ourselves more fully by restoring the
redirection to /dev/null. This gives us an extra layer of protection
against regressions dues to other code paths we've missed.

Though the original issue was reported with "git diff" (and due to its
default of --ext-diff), I've used "diff-tree -w" in the new test. It
triggers the same issue, but I think the fact that "-w" implies
diff_from_contents is a bit more obvious, and fits in with the rest of
t4035.

Reported-by: Jake Zimmerman <[email protected]>
Signed-off-by: Jeff King <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
@dscho
Copy link
Member Author

dscho commented Oct 17, 2025

For the record, I cherry-picked the fix (and the additional "layer of protection", even if that was not strictly necessary to address the reported bug, but if there are similar issues lurking nearby, that layer of protection will paper over them).

@dscho
Copy link
Member Author

dscho commented Oct 17, 2025

/git-artifacts

The tag-git workflow run was started

Copy link

Validate the installer manually

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

@dscho
Copy link
Member Author

dscho commented Oct 17, 2025

/release

The release-git workflow run was started

Copy link

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

@gitforwindowshelper gitforwindowshelper bot merged commit 1454f0a into main Oct 17, 2025
140 checks passed
@gitforwindowshelper gitforwindowshelper bot deleted the rebase-to-v2.51.1 branch October 17, 2025 13:41
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.51.1 [New git version] v2.51.1