Skip to content

Rebase shears/next (#22510374636)#14

Open
gitforwindowshelper[bot] wants to merge 278 commits intobase/shears/next-22510374636from
shears/next-22510374636
Open

Rebase shears/next (#22510374636)#14
gitforwindowshelper[bot] wants to merge 278 commits intobase/shears/next-22510374636from
shears/next-22510374636

Conversation

@gitforwindowshelper
Copy link

Workflow run

Rebase Summary: next

From: 4568f86429 (Merge 'readme' into HEAD, 2018-06-07) (6dab20b57d..4568f86429)
To: 632959db65 (Merge 'readme' into HEAD, 2018-06-07) (56efbc7c1b..632959db65)

Statistics

Metric Count
Total conflicts 0
Skipped (upstreamed) 0
Resolved surgically 0
Range-diff (click to expand)
  1:  9b90a87c27 =   1:  357850c54c sideband: mask control characters
  2:  4149b6ec8f =   2:  42902ebd7d sideband: introduce an "escape hatch" to allow control characters
  3:  b103275b4c =   3:  fd885e0ff3 sideband: do allow ANSI color sequences by default
  4:  77c5ac479c =   4:  ab700166ac unix-socket: avoid leak when initialization fails
  5:  b3473c1d25 =   5:  ae02988e7c grep: prevent `^$` false match at end of file
  6:  6517707c2c =   6:  8008fa4a81 vcpkg_install: detect lack of Git
  7:  692fa519d8 =   7:  73df0f1232 vcpkg_install: add comment regarding slow network connections
  8:  a7cc2eb1fc =   8:  315e9818d7 vcbuild: install ARM64 dependencies when building ARM64 binaries
 11:  0f67516f7d =   9:  e381b4409d mingw: include the Python parts in the build
  9:  371471e18f =  10:  24ebf67926 vcbuild: add an option to install individual 'features'
 13:  0133f83b3f =  11:  8953733755 win32/pthread: avoid name clashes with winpthread
 10:  978f302b48 =  12:  775d6fb9b9 cmake: allow building for Windows/ARM64
 15:  f27584cded =  13:  87e408af7c git-compat-util: avoid redeclaring _DEFAULT_SOURCE
 12:  a0f4c6f049 =  14:  a11ce5a733 ci(vs-build) also build Windows/ARM64 artifacts
 17:  16d5909d9e =  15:  11bc31f459 Import the source code of mimalloc v2.2.7
 14:  93c897d012 =  16:  0a922a0843 Add schannel to curl installation
 18:  b0d9293b3a =  17:  a271d5fc9a t9350: point out that refs are not updated correctly
 20:  607690d64f =  18:  def0a42760 mimalloc: adjust for building inside Git
 16:  6d49b1ce56 =  19:  12595505aa cmake(): allow setting HOST_CPU for cross-compilation
 21:  1e27236fe1 =  20:  20e5493926 transport-helper: add trailing --
 22:  feecf47765 =  21:  c853e51550 mingw: demonstrate a `git add` issue with NTFS junctions
 24:  e1fc02cd05 =  22:  72a958eef7 mimalloc: offer a build-time option to enable it
 25:  bfd3ecd969 =  23:  4a78d44c36 t5505/t5516: allow running without `.git/branches/` in the templates
 19:  af2dd7ea7a =  24:  48d343e183 CMake: default Visual Studio generator has changed
 26:  3aec0f8c4d =  25:  533a0b1dc3 remote-helper: check helper status after import/export
 27:  ee122dec34 =  26:  950246c935 clean: do not traverse mount points
 28:  2858c01c9e =  27:  ea78f897e0 strbuf_realpath(): use platform-dependent API if available
 29:  a7f74e6cdb =  28:  c2b3c12f5b http: use new "best effort" strategy for Secure Channel revoke checking
 30:  ef7d5b389d =  29:  070d412391 subtree: update `contrib/subtree` `test` target
 32:  a0adf843aa =  30:  04345551ac mingw: use mimalloc
 33:  977f1683e2 =  31:  e212e2e118 t5505/t5516: fix white-space around redirectors
 23:  f5d1c93f85 =  32:  639a6d7ad9 .gitignore: add Visual Studio CMakeSetting.json file
 35:  a405f48d62 =  33:  6de2a3dad0 Always auto-gc after calling a fast-import transport
 36:  cbf0f90010 =  34:  dafef06165 mingw: prevent regressions with "drive-less" absolute paths
 37:  f6d12c2266 =  35:  2bd021312f clean: remove mount points when possible
 38:  041f68f6ae =  36:  862c6aa2fb transport: optionally disable side-band-64k
 39:  db243239a0 =  37:  5354a00404 mingw: fix fatal error working on mapped network drives on Windows
 40:  e148d8520d =  38:  2e6f1df141 clink.pl: fix MSVC compile script to handle libcurl-d.lib
 41:  125c0ca4d4 =  39:  8dd2e6d138 mingw: implement a platform-specific `strbuf_realpath()`
 42:  ef38e78619 =  40:  722fcaec12 t3701: verify that we can add *lots* of files interactively
 43:  f4b022daac =  41:  2dee66b297 commit: accept "scissors" with CR/LF line endings
 44:  6a74c7f3fb =  42:  94eaf170f1 t0014: fix indentation
 45:  54f35bd861 =  43:  23d9a13325 git-gui: accommodate for intent-to-add files
 46:  48aeaca702 =  44:  5c0364e231 mingw: allow for longer paths in `parse_interpreter()`
 47:  a4f12f5faf =  45:  fa9b1eeba2 compat/vcbuild: document preferred way to build in Visual Studio
 48:  695c96b37c =  46:  59fdcd914a http: optionally send SSL client certificate
 49:  aadfe83ad3 =  47:  ec014ea2b2 ci: run `contrib/subtree` tests in CI builds
 51:  898618673d =  48:  6f3c447bb1 windows: skip linking `git-<command>` for built-ins
 52:  a379c06b83 =  49:  12877abda9 mingw: stop hard-coding `CC = gcc`
 53:  8b3374de0d =  50:  b3a5b13f06 mingw: drop the -D_USE_32BIT_TIME_T option
 54:  3a32eb69db =  51:  bf3ce5b25f mingw: only use -Wl,--large-address-aware for 32-bit builds
 55:  c42b0e0638 =  52:  ef17f10eb7 mingw: avoid over-specifying `--pic-executable`
 56:  a36b19525f =  53:  1899db9e3c mingw: set the prefix and HOST_CPU as per MSYS2's settings
 57:  1158dbd53d =  54:  b604b2414c mingw: only enable the MSYS2-specific stuff when compiling in MSYS2
 58:  1920f0eaf8 =  55:  4497fea089 mingw: rely on MSYS2's metadata instead of hard-coding it
 59:  f5730e96f4 =  56:  663d3405bb mingw: always define `ETC_*` for MSYS2 environments
 60:  715b07dbe5 =  57:  b09a49981c max_tree_depth: lower it for clang builds in general on Windows
 61:  ae6c9ca94c =  58:  cea92c181c mingw: ensure valid CTYPE
 62:  30f79b152b =  59:  3dce805246 mingw: allow `git.exe` to be used instead of the "Git wrapper"
 63:  290f9e12f4 =  60:  533417b9fb mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory
 64:  6a44aef915 =  61:  1bc6149529 clink.pl: fix libexpatd.lib link error when using MSVC
 65:  11e6ca619a =  62:  8fc3f7d673 Makefile: clean up .ilk files when MSVC=1
 34:  157f42d932 =  63:  c35fac0af6 hash-object: demonstrate a >4GB/LLP64 problem
 66:  d399957539 =  64:  45d97d41ca vcbuild: add support for compiling Windows resource files
 67:  28a2f594c8 =  65:  2b613f9249 object-file.c: use size_t for header lengths
 68:  1f3997e0a6 =  66:  0ac50af782 config.mak.uname: add git.rc to MSVC builds
 69:  45cca86f82 =  67:  2f9fdb28bd MinGW: link as terminal server aware
 70:  b3787b1d24 =  68:  d546719d72 hash algorithms: use size_t for section lengths
 71:  a66facff4c =  69:  893d74fb83 clink.pl: ignore no-stack-protector arg on MSVC=1 builds
 72:  83c2cdf5d3 =  70:  3b0a8a23ea http: optionally load libcurl lazily
 73:  34862f1be1 =  71:  2796e51652 hash-object --stdin: verify that it works with >4GB/LLP64
 74:  e744ed6c90 =  72:  338be07e2c clink.pl: move default linker options for MSVC=1 builds
 75:  353a9fa57f =  73:  ff70d288f6 http: support lazy-loading libcurl also on Windows
 76:  da5550168a =  74:  14347bbbc7 ci: work around a problem with HTTP/2 vs libcurl v8.10.0
 31:  2ca86e74c6 =  75:  1db8607c0e CMakeLists: add default "x64-windows" arch for Visual Studio
 77:  dc8a0911de =  76:  e4c1b0aa51 hash-object: add another >4GB/LLP64 test case
 78:  77a20d57b7 =  77:  47634282f6 setup: properly use "%(prefix)/" when in WSL
 79:  94df3e80cb =  78:  bfd1b6de77 Add config option `windows.appendAtomically`
 80:  08d050db66 =  79:  8355fecf93 cmake: install headless-git.
 81:  8433c72854 =  80:  9dad7b2f65 http: when loading libcurl lazily, allow for multiple SSL backends
 82:  44ac091e65 =  81:  de8313fd46 revision: create mark_trees_uninteresting_dense()
 50:  9ab60d3ec1 =  82:  9718579e4b CMake: show Win32 and Generator_platform build-option values
 83:  1d47a7edee =  83:  247d231f81 hash-object: add a >4GB/LLP64 test case using filtered input
 84:  19662c5351 =  84:  93ce7f4f36 compat/mingw.c: do not warn when failing to get owner
 85:  99bc7828fa =  85:  d6e755a258 mingw: $env:TERM="xterm-256color" for newer OSes
 86:  1e9f0c157e =  86:  230d0ca5ca winansi: check result and Buffer before using Name
 87:  30db7ad52f =  87:  2b27dafc3d mingw: change core.fsyncObjectFiles = 1 by default
 88:  1d4fffb0a3 =  88:  6511c52bee Fix Windows version resources
 89:  563f5b7ae8 =  89:  2ff8280f72 status: fix for old-style submodules with commondir
 90:  3d2eda3397 =  90:  fd11bd2c3b git.rc: include winuser.h
 91:  d57cbe40f1 =  91:  379299e310 mingw: do load libcurl dynamically by default
 92:  c5274c78e1 =  92:  882b57c03d Add a GitHub workflow to verify that Git/Scalar work in Nano Server
 93:  4bb2eb8223 =  93:  42771a115b mingw: suggest `windows.appendAtomically` in more cases
 94:  23d7401e09 =  94:  34d90d9ece win32: use native ANSI sequence processing, if possible
 95:  1c17f16226 =  95:  0bf3f1b7c6 common-main.c: fflush stdout buffer upon exit
 96:  9040e4fe22 =  96:  1cf845f293 t5601/t7406(mingw): do run tests with symlink support
 97:  4e5dac3b1c =  97:  a16502bd08 win32: ensure that `localtime_r()` is declared even in i686 builds
 98:  5f154c52a6 =  98:  0f8ffa21da Fallback to AppData if XDG_CONFIG_HOME is unset
 99:  4031b12b4d =  99:  8d5082c2d8 run-command: be helpful with Git LFS fails on Windows 7
100:  a844ca33c1 = 100:  5d81782a58 survey: stub in new experimental 'git-survey' command
101:  51729832e6 = 101:  cb7ad8bea6 survey: add command line opts to select references
102:  1a82caedd9 = 102:  d28a9372a7 survey: start pretty printing data in table form
103:  4704b533b0 = 103:  dad3323281 survey: add object count summary
104:  a081df6102 = 104:  5b6567236a survey: summarize total sizes by object type
105:  ee5faafa7a = 105:  dac3e86b54 survey: show progress during object walk
106:  5f67eaf27d = 106:  a15403f6ca mingw: make sure `errno` is set correctly when socket operations fail
107:  e9c61b6d01 = 107:  099f082e3c survey: add ability to track prioritized lists
108:  9a323d310d = 108:  0abdb8c500 compat/mingw: handle WSA errors in strerror
109:  880903af16 = 109:  6796b8eafe survey: add report of "largest" paths
110:  74c2841d5f = 110:  e16edc3a49 compat/mingw: drop outdated comment
111:  068f838d05 = 111:  f9f4d51692 survey: add --top=<N> option and config
112:  ac9deb6595 = 112:  a45a10b586 t0301: actually test credential-cache on Windows
113:  6e7f696918 = 113:  8e4f2196bb survey: clearly note the experimental nature in the output
114:  06a04b5e0d = 114:  e828a5493d credential-cache: handle ECONNREFUSED gracefully
115:  f40a52031a = 115:  8799ccbcad reftable: do make sure to use custom allocators
116:  8112459530 = 116:  ab53c9fbb7 check-whitespace: avoid alerts about upstream commits
117:  8ce0fa1aff = 117:  af2f894e23 t/t5571-prep-push-hook.sh: Add test with writing to stderr
118:  3f51ee3e83 = 118:  ced766443c git-svn: mark it as unsupported by the Git for Windows project
119:  1cfa87da5a = 119:  13207d665a ci(macos): skip the `git p4` tests
120:  3047aa1501 = 120:  3312354012 Win32: make FILETIME conversion functions public
121:  3442403d67 = 121:  119c72dcae Win32: dirent.c: Move opendir down
122:  51b691d490 = 122:  13413cbfbf mingw: make the dirent implementation pluggable
123:  eb90193696 = 123:  f87421b10f Win32: make the lstat implementation pluggable
124:  b0dcfde506 = 124:  d14ba091de mingw: add infrastructure for read-only file system level caches
125:  d11074188f = 125:  027ad77224 mingw: add a cache below mingw's lstat and dirent implementations
126:  00315af165 = 126:  afc848bb43 fscache: load directories only once
127:  354add4898 = 127:  e55830f1ed fscache: add key for GIT_TRACE_FSCACHE
128:  dbe29e585f = 128:  70db6016d7 fscache: remember not-found directories
129:  774d295741 = 129:  824898e14e fscache: add a test for the dir-not-found optimization
130:  901d737e04 = 130:  7a1dd1007e add: use preload-index and fscache for performance
131:  baedbb52f1 = 131:  0530e194ff dir.c: make add_excludes aware of fscache during status
132:  484ced20ee = 132:  2b6c84e90e fscache: make fscache_enabled() public
133:  65e4c60647 = 133:  945cffe6fc dir.c: regression fix for add_excludes with fscache
134:  86b905ebd2 = 134:  70faa2f96d fetch-pack.c: enable fscache for stats under .git/objects
136:  619d6c8844 = 135:  a6dbf11185 checkout.c: enable fscache for checkout again
138:  b0ae137eca = 136:  59ce867f15 Enable the filesystem cache (fscache) in refresh_index().
135:  2cb3a16ee0 = 137:  438a5079b9 git-gui--askyesno: fix funny text wrapping
139:  4d1187022c = 138:  55fed9ce24 fscache: use FindFirstFileExW to avoid retrieving the short name
137:  d7ab224cf8 = 139:  02f3233f0f git-gui--askyesno (mingw): use Git for Windows' icon, if available
140:  8b4e5d14e7 = 140:  79d29b144d fscache: add GIT_TEST_FSCACHE support
141:  a21f9ebfb6 = 141:  cf2fc90100 fscache: add fscache hit statistics
142:  033d738f9b = 142:  1bff75db81 unpack-trees: enable fscache for sparse-checkout
143:  9d09132b8d = 143:  8559d0a770 status: disable and free fscache at the end of the status command
144:  2f478b20ca = 144:  17634c0143 mem_pool: add GIT_TRACE_MEMPOOL support
145:  353a75b671 = 145:  0b1a5691c5 fscache: fscache takes an initial size
146:  77167471b9 = 146:  7b2a1db26b fscache: update fscache to be thread specific instead of global
147:  90b8bafdfa = 147:  f4b6a73640 fscache: teach fscache to use mempool
148:  bd62f3c014 = 148:  71b9d3ec16 fscache: make fscache_enable() thread safe
149:  1c8382c332 = 149:  e8df017b1a fscache: teach fscache to use NtQueryDirectoryFile
150:  af4f9e5567 = 150:  52c90a50e5 fscache: remember the reparse tag for each entry
151:  aaec3f1a1a = 151:  1a4a0b9cc3 fscache: implement an FSCache-aware is_mount_point()
152:  206e78fbbc = 152:  758910b66d clean: make use of FSCache
153:  f878817e85 = 153:  a9fd2f2bf8 pack-objects (mingw): demonstrate a segmentation fault with large deltas
154:  d39cdd8798 = 154:  6857a8d500 mingw: support long paths
155:  a1ec1972aa = 155:  6c7e887327 win32(long path support): leave drive-less absolute paths intact
156:  90b7c1b867 = 156:  a8337bfe78 compat/fsmonitor/fsm-*-win32: support long paths
157:  ba3ac83574 = 157:  46598ca0cf clean: suggest using `core.longPaths` if paths are too long to remove
158:  79014ad60b = 158:  c77d69be0b mingw: Support `git_terminal_prompt` with more terminals
159:  7a1b798d6a = 159:  f7ba249f8d compat/terminal.c: only use the Windows console if bash 'read -r' fails
160:  8ed48c50c9 = 160:  779419949b mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
161:  afbc7b213d = 161:  402cf51ffa Win32: symlink: move phantom symlink creation to a separate function
162:  47de058396 = 162:  04ce3687a7 Introduce helper to create symlinks that knows about index_state
163:  bb169631b6 = 163:  4fca8e48a1 mingw: allow to specify the symlink type in .gitattributes
164:  fdf326e6a2 = 164:  cb5a19e6c2 Win32: symlink: add test for `symlink` attribute
165:  cde569ac32 = 165:  a6caea2233 mingw: explicitly specify with which cmd to prefix the cmdline
166:  4d8095b25c = 166:  d5f5cd23d7 mingw: when path_lookup() failed, try BusyBox
167:  18c613f2b0 = 167:  5b2f43497a test-tool: learn to act as a drop-in replacement for `iconv`
168:  acc252e1fe = 168:  112b1a99ce tests(mingw): if `iconv` is unavailable, use `test-helper --iconv`
169:  c9eba352d6 = 169:  fd93749fdc gitattributes: mark .png files as binary
170:  08425a3da9 = 170:  4b101250a4 tests: move test PNGs into t/lib-diff/
171:  6edcc3286a = 171:  31873f8af5 tests: only override sort & find if there are usable ones in /usr/bin/
173:  94966d7ec8 = 172:  99cab419ce tests: use the correct path separator with BusyBox
175:  4e87300e3b = 173:  f7e0c5d222 mingw: only use Bash-ism `builtin pwd -W` when available
177:  729fc5e4cb = 174:  43ad6fc936 tests (mingw): remove Bash-specific pwd option
172:  b7549160d6 = 175:  b50b3fc448 mingw: introduce code to detect whether we're inside a Windows container
179:  aa7fac8bcf = 176:  664189c44d test-lib: add BUSYBOX prerequisite
174:  013b6cca71 = 177:  f491786436 mingw: when running in a Windows container, try to rename() harder
181:  28c26fd646 = 178:  3892c684f9 t5003: use binary file from t/lib-diff/
176:  daff9f78d3 = 179:  2989a44ffd mingw: move the file_attr_to_st_mode() function definition
182:  586a328da4 = 180:  70ae474fdd t5532: workaround for BusyBox on Windows
178:  48bf02a0e6 = 181:  48156e7503 mingw: Windows Docker volumes are *not* symbolic links
183:  1b4417f3c6 = 182:  a6172bad12 t5605: special-case hardlink test for BusyBox-w32
180:  ac09f02938 = 183:  0707d850c4 mingw: work around rename() failing on a read-only file
184:  e09b5c9a6a = 184:  ef82291b68 t5813: allow for $PWD to be a Windows path
185:  bff0721b52 = 185:  08bc8adcc7 t9200: skip tests when $PWD contains a colon
186:  6099c07ed2 = 186:  72253a869e Describe Git for Windows' architecture [no ci]
187:  4e21a2139a = 187:  0508b60260 mingw: kill child processes in a gentler way
188:  99bd6dac9d = 188:  2e7cbec8c9 mingw: optionally enable wsl compability file mode bits
189:  27a6786a44 = 189:  9b5df87b82 Modify the Code of Conduct for Git for Windows
190:  14efcbccf6 = 190:  13831e81ed mingw: really handle SIGINT
191:  348842f70e = 191:  0ac4e476bb CONTRIBUTING.md: add guide for first-time contributors
192:  4fd7c3335a = 192:  a99488f601 Partially un-revert "editor: save and reset terminal after calling EDITOR"
193:  4d522e26f2 = 193:  866cd4f76c README.md: Add a Windows-specific preamble
194:  c2927cd170 = 194:  362c1fd318 reset: reinstate support for the deprecated --stdin option
195:  f2bbc6ec76 = 195:  8913b6d03b Add an issue template
196:  a9986425d3 = 196:  d56d1a6b43 Add a GitHub workflow to monitor component updates
197:  f2a3eaf83f = 197:  812d895360 fsmonitor: reintroduce core.useBuiltinFSMonitor
198:  462e2a77b8 = 198:  8492ed74c4 Modify the GitHub Pull Request template (to reflect Git for Windows)
199:  f7195daa2d = 199:  0516108bcf dependabot: help keeping GitHub Actions versions up to date
200:  1e4de7a0a6 = 200:  ef36ff6df3 SECURITY.md: document Git for Windows' policies

dscho and others added 30 commits February 28, 2026 01:29
Windows' equivalent to "bind mounts", NTFS junction points, can be
unlinked without affecting the mount target. This is clearly what users
expect to happen when they call `git clean -dfx` in a worktree that
contains NTFS junction points: the junction should be removed, and the
target directory of said junction should be left alone (unless it is
inside the worktree).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
While Git for Windows does not _ship_ Python (in order to save on
bandwidth), MSYS2 provides very fine Python interpreters that users can
easily take advantage of, by using Git for Windows within its SDK.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Thorough benchmarking with repacking a subset of linux.git (the commit
history reachable from 93a6fef ([PATCH] fix the SYSCTL=n compilation,
2007-02-28), to be precise) suggest that this allocator is on par, in
multi-threaded situations maybe even better than nedmalloc:

`git repack -adfq` with mimalloc, 8 threads:

31.166991900 27.576763800 28.712311000 27.373859000 27.163141900

`git repack -adfq` with nedmalloc, 8 threads:

31.915032900 27.149883100 28.244933700 27.240188800 28.580849500

In a different test using GitHub Actions build agents (probably
single-threaded, a core-strength of nedmalloc)):

`git repack -q -d -l -A --unpack-unreachable=2.weeks.ago` with mimalloc:

943.426 978.500 939.709 959.811 954.605

`git repack -q -d -l -A --unpack-unreachable=2.weeks.ago` with nedmalloc:

995.383 952.179 943.253 963.043 980.468

While these measurements were not executed with complete scientific
rigor, as no hardware was set aside specifically for these benchmarks,
it shows that mimalloc and nedmalloc perform almost the same, nedmalloc
with a bit higher variance and also slightly higher average (further
testing suggests that nedmalloc performs worse in multi-threaded
situations than in single-threaded ones).

In short: mimalloc seems to be slightly better suited for our purposes
than nedmalloc.

Seeing that mimalloc is developed actively, while nedmalloc ceased to
see any updates in eight years, let's use mimalloc on Windows instead.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Since commit 0c499ea (send-pack: demultiplex a sideband stream with
status data, 2010-02-05) the send-pack builtin uses the side-band-64k
capability if advertised by the server.

Unfortunately this breaks pushing over the dump git protocol if used
over a network connection.

The detailed reasons for this breakage are (by courtesy of Jeff Preshing,
quoted from https://groups.google.com/d/msg/msysgit/at8D7J-h7mw/eaLujILGUWoJ):

	MinGW wraps Windows sockets in CRT file descriptors in order to
	mimic the functionality of POSIX sockets. This causes msvcrt.dll
	to treat sockets as Installable File System (IFS) handles,
	calling ReadFile, WriteFile, DuplicateHandle and CloseHandle on
	them. This approach works well in simple cases on recent
	versions of Windows, but does not support all usage patterns. In
	particular, using this approach, any attempt to read & write
	concurrently on the same socket (from one or more processes)
	will deadlock in a scenario where the read waits for a response
	from the server which is only invoked after the write. This is
	what send_pack currently attempts to do in the use_sideband
	codepath.

The new config option `sendpack.sideband` allows to override the
side-band-64k capability of the server, and thus makes the dumb git
protocol work.

Other transportation methods like ssh and http/https still benefit from
the sideband channel, therefore the default value of `sendpack.sideband`
is still true.

Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>
Signed-off-by: Oliver Schneider <oliver@assarbad.net>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In 1e64d18 (mingw: do resolve symlinks in `getcwd()`) a problem was
introduced that causes git for Windows to stop working with certain
mapped network drives (in particular, drives that are mapped to
locations with long path names). Error message was "fatal: Unable to
read current working directory: No such file or directory". Present
change fixes this issue as discussed in
git-for-windows#2480

Signed-off-by: Bjoern Mueller <bjoernm@gmx.de>
Update clink.pl to link with either libcurl.lib or libcurl-d.lib
depending on whether DEBUG=1 is set.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
There is a Win32 API function to resolve symbolic links, and we can use
that instead of resolving them manually. Even better, this function also
resolves NTFS junction points (which are somewhat similar to bind
mounts).

This fixes git-for-windows#2481.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The native Windows HTTPS backend is based on Secure Channel which lets
the caller decide how to handle revocation checking problems caused by
missing information in the certificate or offline CRL distribution
points.

Unfortunately, cURL chose to handle these problems differently than
OpenSSL by default: while OpenSSL happily ignores those problems
(essentially saying "¯\_(ツ)_/¯"), the Secure Channel backend will error
out instead.

As a remedy, the "no revoke" mode was introduced, which turns off
revocation checking altogether. This is a bit heavy-handed. We support
this via the `http.schannelCheckRevoke` setting.

In curl/curl#4981, we contributed an opt-in
"best effort" strategy that emulates what OpenSSL seems to do.

In Git for Windows, we actually want this to be the default. This patch
makes it so, introducing it as a new value for the
`http.schannelCheckRevoke" setting, which now becmes a tristate: it
accepts the values "false", "true" or "best-effort" (defaulting to the
last one).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The convention in Git project's shell scripts is to have white-space
_before_, but not _after_ the `>` (or `<`).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This change enhances `git commit --cleanup=scissors` by detecting
scissors lines ending in either LF (UNIX-style) or CR/LF (DOS-style).

Regression tests are included to specifically test for trailing
comments after a CR/LF-terminated scissors line.

Signed-off-by: Luke Bonanomi <lbonanomi@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
For some reason, this test case was indented with 4 spaces instead of 1
horizontal tab. The other test cases in the same test script are fine.

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
As of Git v2.28.0, the diff for files staged via `git add -N` marks them
as new files. Git GUI was ill-prepared for that, and this patch teaches
Git GUI about them.

Please note that this will not even fix things with v2.28.0, as the
`rp/apply-cached-with-i-t-a` patches are required on Git's side, too.

This fixes git-for-windows#2779

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
The vcpkg downloads may not succeed. Warn careful readers of the time out.

A simple retry will usually resolve the issue.

Signed-off-by: Philip Oakley <philipoakley@iee.email>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Git's regular Makefile mentions that HOST_CPU should be defined when cross-compiling Git: https://github.com/git-for-windows/git/blob/37796bca76ef4180c39ee508ca3e42c0777ba444/Makefile#L438-L439

This is then used to set the GIT_HOST_CPU variable when compiling Git: https://github.com/git-for-windows/git/blob/37796bca76ef4180c39ee508ca3e42c0777ba444/Makefile#L1337-L1341

Then, when the user runs `git version --build-options`, it returns that value: https://github.com/git-for-windows/git/blob/37796bca76ef4180c39ee508ca3e42c0777ba444/help.c#L658

This commit adds the same functionality to the CMake configuration. Users can now set -DHOST_CPU= to set the target architecture.

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
As reported in newren/git-filter-repo#225, it
looks like 99 bytes is not really sufficient to represent e.g. the full
path to Python when installed via Windows Store (and this path is used
in the hasb bang line when installing scripts via `pip`).

Let's increase it to what is probably the maximum sensible path size:
MAX_PATH. This makes `parse_interpreter()` in line with what
`lookup_prog()` handles.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Vilius Šumskas <vilius@sumskas.eu>
These fixes have been sent to the Git mailing list but have not been
picked up by the Git project yet.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
We used to have that `make vcxproj` hack, but a hack it is. In the
meantime, we have a much cleaner solution: using CMake, either
explicitly, or even more conveniently via Visual Studio's built-in CMake
support (simply open Git's top-level directory via File>Open>Folder...).

Let's let the `README` reflect this.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This adds support for a new http.sslAutoClientCert config value.

In cURL 7.77 or later the schannel backend does not automatically send
client certificates from the Windows Certificate Store anymore.

This config value is only used if http.sslBackend is set to "schannel",
and can be used to opt in to the old behavior and force cURL to send
client certificates.

This fixes git-for-windows#3292

Signed-off-by: Pascal Muller <pascalmuller@gmail.com>
Because `git subtree` (unlike most other `contrib` modules) is included as
part of the standard release of Git for Windows, its stability should be
verified as consistently as it is for the rest of git. By including the
`git subtree` tests in the CI workflow, these tests are as much of a gate to
merging and indicator of stability as the standard test suite.

Signed-off-by: Victoria Dye <vdye@github.com>
This is no longer true in general, not with supporting Clang out of the
box.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This option was added in fa93bb2 (MinGW: Fix stat definitions to
work with MinGW runtime version 4.0, 2013-09-11), i.e. a _long_ time
ago. So long, in fact, that it still targeted MinGW. But we switched to
mingw-w64 in 2015, which seems not to share the problem, and therefore
does not require a fix.

Even worse: This flag is incompatible with UCRT64, which we are about to
support by way of upstreaming `mingw-w64-git` to the MSYS2 project, see
msys2/MINGW-packages#26470 for details.

So let's send that option into its well-deserved retirement.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Merge this early to resolve merge conflicts early.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
That option only matters there, and is in fact only really understood in
those builds; UCRT64 versions of GCC, for example, do not know what to
do with that option.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When building with `make MSVC=1 DEBUG=1`, link to `libexpatd.lib`
rather than `libexpat.lib`.

It appears that the `vcpkg` package for "libexpat" has changed and now
creates `libexpatd.lib` for debug mode builds.  Previously, both debug
and release builds created a ".lib" with the same basename.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
On LLP64 systems, such as Windows, the size of `long`, `int`, etc. is
only 32 bits (for backward compatibility). Git's use of `unsigned long`
for file memory sizes in many places, rather than size_t, limits the
handling of large files on LLP64 systems (commonly given as `>4GB`).

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

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

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

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

So let's drop the overly-specific definition.

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

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

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

Signed-off-by: Philip Oakley <philipoakley@iee.email>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho and others added 30 commits February 28, 2026 01:29
This was pull request git-for-windows#1645 from ZCube/master

Support windows container.

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>
…ws#4527)

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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>
The Git for Windows project has grown quite complex over the years,
certainly much more complex than during the first years where the
`msysgit.git` repository was abusing Git for package management purposes
and the `git/git` fork was called `4msysgit.git`.

Let's describe the status quo in a thorough way.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The TerminateProcess() function does not actually leave the child
processes any chance to perform any cleanup operations. This is bad
insofar as Git itself expects its signal handlers to run.

A symptom is e.g. a left-behind .lock file that would not be left behind
if the same operation was run, say, on Linux.

To remedy this situation, we use an obscure trick: we inject a thread
into the process that needs to be killed and to let that thread run the
ExitProcess() function with the desired exit status. Thanks J Wyman for
describing this trick.

The advantage is that the ExitProcess() function lets the atexit
handlers run. While this is still different from what Git expects (i.e.
running a signal handler), in practice Git sets up signal handlers and
atexit handlers that call the same code to clean up after itself.

In case that the gentle method to terminate the process failed, we still
fall back to calling TerminateProcess(), but in that case we now also
make sure that processes spawned by the spawned process are terminated;
TerminateProcess() does not give the spawned process a chance to do so
itself.

Please note that this change only affects how Git for Windows tries to
terminate processes spawned by Git's own executables. Third-party
software that *calls* Git and wants to terminate it *still* need to make
sure to imitate this gentle method, otherwise this patch will not have
any effect.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The Windows Subsystem for Linux (WSL) version 2 allows to use `chmod` on
NTFS volumes provided that they are mounted with metadata enabled (see
https://devblogs.microsoft.com/commandline/chmod-chown-wsl-improvements/
for details), for example:

	$ chmod 0755 /mnt/d/test/a.sh

In order to facilitate better collaboration between the Windows
version of Git and the WSL version of Git, we can make the Windows
version of Git also support reading and writing NTFS file modes
in a manner compatible with WSL.

Since this slightly slows down operations where lots of files are
created (such as an initial checkout), this feature is only enabled when
`core.WSLCompat` is set to true. Note that you also have to set
`core.fileMode=true` in repositories that have been initialized without
enabling WSL compatibility.

There are several ways to enable metadata loading for NTFS volumes
in WSL, one of which is to modify `/etc/wsl.conf` by adding:

```
[automount]
enabled = true
options = "metadata,umask=027,fmask=117"
```

And reboot WSL.

It can also be enabled temporarily by this incantation:

	$ sudo umount /mnt/c &&
	  sudo mount -t drvfs C: /mnt/c -o metadata,uid=1000,gid=1000,umask=22,fmask=111

It's important to note that this modification is compatible with, but
does not depend on WSL. The helper functions in this commit can operate
independently and functions normally on devices where WSL is not
installed or properly configured.

Signed-off-by: xungeng li <xungeng@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The Git project followed Git for Windows' lead and added their Code of
Conduct, based on the Contributor Covenant v1.4, later updated to v2.0.

We adapt it slightly to Git for Windows.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Previously, we did not install any handler for Ctrl+C, but now we really
want to because the MSYS2 runtime learned the trick to call the
ConsoleCtrlHandler when Ctrl+C was pressed.

With this, hitting Ctrl+C while `git log` is running will only terminate
the Git process, but not the pager. This finally matches the behavior on
Linux and on macOS.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This patch introduces support to set special NTFS attributes that are
interpreted by the Windows Subsystem for Linux as file mode bits, UID
and GID.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Getting started contributing to Git can be difficult on a Windows
machine. CONTRIBUTING.md contains a guide to getting started, including
detailed steps for setting up build tools, running tests, and
submitting patches to upstream.

[includes an example by Pratik Karki how to submit v2, v3, v4, etc.]

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
…ITOR"

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

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

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

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Handle Ctrl+C in Git Bash nicely

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

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

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

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

Helped-by: Victoria Dye <vdye@github.com>
Helped-by: Matthew John Cheetham <mjcheetham@outlook.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
A fix for calling `vim` in Windows Terminal caused a regression and was
reverted. We partially un-revert this, to get the fix again.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
With improvements by Clive Chan, Adric Norris, Ben Bodenmiller and
Philip Oakley.

Helped-by: Clive Chan <cc@clive.io>
Helped-by: Adric Norris <landstander668@gmail.com>
Helped-by: Ben Bodenmiller <bbodenmiller@hotmail.com>
Helped-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Brendan Forster <brendan@github.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Rather than using private IFTTT Applets that send mails to this
maintainer whenever a new version of a Git for Windows component was
released, let's use the power of GitHub workflows to make this process
publicly visible.

This workflow monitors the Atom/RSS feeds, and opens a ticket whenever a
new version was released.

Note: Bash sometimes releases multiple patched versions within a few
minutes of each other (i.e. 5.1p1 through 5.1p4, 5.0p15 and 5.0p16). The
MSYS2 runtime also has a similar system. We can address those patches as
a group, so we shouldn't get multiple issues about them.

Note further: We're not acting on newlib releases, OpenSSL alphas, Perl
release candidates or non-stable Perl releases. There's no need to open
issues about them.

Co-authored-by: Matthias Aßhauer <mha1993@live.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Reintroduce the 'core.useBuiltinFSMonitor' config setting (originally added
in 0a756b2 (fsmonitor: config settings are repository-specific,
2021-03-05)) after its removal from the upstream version of FSMonitor.

Upstream, the 'core.useBuiltinFSMonitor' setting was rendered obsolete by
"overloading" the 'core.fsmonitor' setting to take a boolean value. However,
several applications (e.g., 'scalar') utilize the original config setting,
so it should be preserved for a deprecation period before complete removal:

* if 'core.fsmonitor' is a boolean, the user is correctly using the new
  config syntax; do not use 'core.useBuiltinFSMonitor'.
* if 'core.fsmonitor' is unspecified, use 'core.useBuiltinFSMonitor'.
* if 'core.fsmonitor' is a path, override and use the builtin FSMonitor if
  'core.useBuiltinFSMonitor' is 'true'; otherwise, use the FSMonitor hook
  indicated by the path.

Additionally, for this deprecation period, advise users to switch to using
'core.fsmonitor' to specify their use of the builtin FSMonitor.

Signed-off-by: Victoria Dye <vdye@github.com>
This topic branch re-adds the deprecated --stdin/-z options to `git
reset`. Those patches were overridden by a different set of options in
the upstream Git project before we could propose `--stdin`.

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

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Git for Windows accepts pull requests; Core Git does not. Therefore we
need to adjust the template (because it only matches core Git's
project management style, not ours).

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

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

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This is the recommended way on GitHub to describe policies revolving around
security issues and about supported versions.

Helped-by: Sven Strickroth <email@cs-ware.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
…updates

Start monitoring updates of Git for Windows' component in the open
Add a README.md for GitHub goodness.

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