Skip to content

Rebase shears/seen (#22745352209)#25

Open
gitforwindowshelper[bot] wants to merge 274 commits intobase/shears/seen-22745352209from
shears/seen-22745352209
Open

Rebase shears/seen (#22745352209)#25
gitforwindowshelper[bot] wants to merge 274 commits intobase/shears/seen-22745352209from
shears/seen-22745352209

Conversation

@gitforwindowshelper
Copy link
Copy Markdown

Workflow run

Rebase Summary: seen

From: 901f0bb39d (Merge 'readme' into HEAD, 2018-06-07) (7c724b22f7..901f0bb39d)
To: 31cb479b22 (Merge 'readme' into HEAD, 2018-06-07) (ebda021e1d..31cb479b22)

Statistics

Metric Count
Total conflicts 0
Skipped (upstreamed) 0
Resolved surgically 0
Range-diff (click to expand)
  1:  4d9f8b7844 =   1:  83b3f5c354 unix-socket: avoid leak when initialization fails
  2:  76c5a2d973 =   2:  f9fc5d9732 grep: prevent `^$` false match at end of file
 12:  bbc129aa6a =   3:  d5cbaeae8a vcpkg_install: detect lack of Git
 13:  c655be9e18 =   4:  6198b3e72b vcpkg_install: add comment regarding slow network connections
 14:  344a5e83ab =   5:  6a50c6d42f vcbuild: install ARM64 dependencies when building ARM64 binaries
 15:  de17168b6e =   6:  5dd458714d vcbuild: add an option to install individual 'features'
 16:  6437b14e36 =   7:  0a3f000ff8 cmake: allow building for Windows/ARM64
  5:  eb6f94a0ce =   8:  1cbfe79123 mingw: include the Python parts in the build
 17:  85c6b1cae7 =   9:  d17a761f61 ci(vs-build) also build Windows/ARM64 artifacts
  8:  f1c8526a75 =  10:  15fd3ac50a win32/pthread: avoid name clashes with winpthread
 18:  6681da6c14 =  11:  08206dd2d2 Add schannel to curl installation
 20:  503c4d5ab3 =  12:  f0355f19b0 git-compat-util: avoid redeclaring _DEFAULT_SOURCE
 21:  8ab2b3bb79 =  13:  66bb8f8653 cmake(): allow setting HOST_CPU for cross-compilation
 23:  9ead5c3ae1 =  14:  23808df5fd Import the source code of mimalloc v2.2.7
  3:  a69e3c9aba =  15:  d30198a013 t9350: point out that refs are not updated correctly
 24:  07f8d42f96 =  16:  0696f20421 CMake: default Visual Studio generator has changed
 26:  488f98e19f =  17:  573ee607f9 mimalloc: adjust for building inside Git
  4:  b089f26ed2 =  18:  042522922c transport-helper: add trailing --
 27:  fbd2d1495a =  19:  5f97ec9dd3 mingw: demonstrate a `git add` issue with NTFS junctions
 28:  d777e5512f =  20:  1f19b7b6f9 .gitignore: add Visual Studio CMakeSetting.json file
 30:  bbefd7dd38 =  21:  742de6135b mimalloc: offer a build-time option to enable it
 31:  65e58b24bf =  22:  93078647ff t5505/t5516: allow running without `.git/branches/` in the templates
  6:  180d1958c5 =  23:  d4c36b25d3 remote-helper: check helper status after import/export
  7:  0a2e1e8367 =  24:  40806ae94f clean: do not traverse mount points
 32:  3818b3df85 =  25:  2b9945d0f9 strbuf_realpath(): use platform-dependent API if available
 33:  8536af2c21 =  26:  dfba6132bc http: use new "best effort" strategy for Secure Channel revoke checking
 34:  7a124a830f =  27:  131dc5cd29 subtree: update `contrib/subtree` `test` target
 35:  dec3491995 =  28:  3802c9f751 CMakeLists: add default "x64-windows" arch for Visual Studio
 39:  2eb3fd6274 =  29:  274538a9cb mingw: use mimalloc
 40:  8063e9a5c0 =  30:  2e6e2d1b34 t5505/t5516: fix white-space around redirectors
 19:  b1b111e2b4 =  31:  6d4b7191da hash-object: demonstrate a >4GB/LLP64 problem
  9:  8800cb3e7e =  32:  89d9eb3605 Always auto-gc after calling a fast-import transport
 10:  1a9cadab31 =  33:  496e0eae47 mingw: prevent regressions with "drive-less" absolute paths
 11:  e76524d3c3 =  34:  bb0d5ad6f8 clean: remove mount points when possible
 42:  ccab0e8b95 =  35:  d330cc1383 transport: optionally disable side-band-64k
 43:  c899991d43 =  36:  586cb53986 mingw: fix fatal error working on mapped network drives on Windows
 44:  806a62e335 =  37:  344d4fb3af clink.pl: fix MSVC compile script to handle libcurl-d.lib
 45:  ab91a90fec =  38:  fa2f2add09 mingw: implement a platform-specific `strbuf_realpath()`
 46:  f96f39bb88 =  39:  cb8ca86998 t3701: verify that we can add *lots* of files interactively
 47:  8e8949afd8 =  40:  80b9a86044 commit: accept "scissors" with CR/LF line endings
 48:  d1f15c5a55 =  41:  dcbcc24abe t0014: fix indentation
 49:  13ef6ffb74 =  42:  f096a7bc9d git-gui: accommodate for intent-to-add files
 50:  9b4cd4ae5f =  43:  a54aa89e1b mingw: allow for longer paths in `parse_interpreter()`
 51:  843231886d =  44:  bd3b2c00c8 compat/vcbuild: document preferred way to build in Visual Studio
 52:  37eaec8d42 =  45:  cacc09cbbb http: optionally send SSL client certificate
 53:  a7f90b637a =  46:  f7c47ae965 ci: run `contrib/subtree` tests in CI builds
 54:  63e328cdbf =  47:  d1ed162b21 CMake: show Win32 and Generator_platform build-option values
 61:  2aad544f9c =  48:  a4e4355f02 windows: skip linking `git-<command>` for built-ins
 62:  9fc7570757 =  49:  04bb43bad3 mingw: stop hard-coding `CC = gcc`
 63:  510b15c75f =  50:  139bbe98df mingw: drop the -D_USE_32BIT_TIME_T option
 64:  b159d0eb7d =  51:  90c229eaa5 mingw: only use -Wl,--large-address-aware for 32-bit builds
 65:  c101fa8f34 =  52:  24a0d837ca mingw: avoid over-specifying `--pic-executable`
 66:  78c37414a5 =  53:  fcfcba7b48 mingw: set the prefix and HOST_CPU as per MSYS2's settings
 67:  b75d12cf04 =  54:  d180cc508d mingw: only enable the MSYS2-specific stuff when compiling in MSYS2
 68:  a331272350 =  55:  59523e6347 mingw: rely on MSYS2's metadata instead of hard-coding it
 69:  28238be34f =  56:  a4a1f85196 mingw: always define `ETC_*` for MSYS2 environments
 70:  018ee1deee =  57:  9ac72d34c1 max_tree_depth: lower it for clang builds in general on Windows
 71:  bca6bbf168 =  58:  ccf5e12252 mingw: ensure valid CTYPE
 73:  cd16dbcb09 =  59:  cc5b5e19c2 mingw: allow `git.exe` to be used instead of the "Git wrapper"
 75:  4096af94e0 =  60:  b580edc915 mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory
 78:  64a3d77020 =  61:  428c9c43b9 clink.pl: fix libexpatd.lib link error when using MSVC
 80:  0e9aea02d5 =  62:  853370c0ad Makefile: clean up .ilk files when MSVC=1
 82:  4a0461e800 =  63:  96361d0bdd vcbuild: add support for compiling Windows resource files
 22:  9d55d2d2ba =  64:  3ad68a335e object-file.c: use size_t for header lengths
 84:  e28630eb25 =  65:  3ac0c77481 config.mak.uname: add git.rc to MSVC builds
 41:  2bbeb8651a =  66:  2d07fa1a6e MinGW: link as terminal server aware
 25:  a8cea6a488 =  67:  4fff80bd1c hash algorithms: use size_t for section lengths
 87:  d9ba9dc4fc =  68:  5a75f8c8a6 clink.pl: ignore no-stack-protector arg on MSVC=1 builds
 88:  698123aa96 =  69:  e9d694a9f9 http: optionally load libcurl lazily
 29:  38d313786d =  70:  4f26a4f999 hash-object --stdin: verify that it works with >4GB/LLP64
 91:  d6737009e5 =  71:  7a3dff0b4a clink.pl: move default linker options for MSVC=1 builds
 92:  8d4162f585 =  72:  e8182984ff http: support lazy-loading libcurl also on Windows
 72:  d797ef5a83 =  73:  289367ef16 ci: work around a problem with HTTP/2 vs libcurl v8.10.0
 36:  34ab777769 =  74:  3e9866eb34 hash-object: add another >4GB/LLP64 test case
 37:  956042fa14 =  75:  2f48382a07 setup: properly use "%(prefix)/" when in WSL
 38:  c6406343e7 =  76:  b0243b739b Add config option `windows.appendAtomically`
 95:  97d1734c88 =  77:  370f9b6b10 cmake: install headless-git.
 96:  9bfc44fc8b =  78:  26a380a3c1 http: when loading libcurl lazily, allow for multiple SSL backends
 74:  a166a014d6 =  79:  9116d04111 revision: create mark_trees_uninteresting_dense()
 55:  47fd22b0ee =  80:  7b13465bea hash-object: add a >4GB/LLP64 test case using filtered input
 56:  e2d11ac984 =  81:  35f8f427a7 compat/mingw.c: do not warn when failing to get owner
 57:  eb4188eb95 =  82:  fd85b45220 mingw: $env:TERM="xterm-256color" for newer OSes
 58:  8599496784 =  83:  dcb8e709e5 winansi: check result and Buffer before using Name
 59:  43ec2416da =  84:  1781edb4da mingw: change core.fsyncObjectFiles = 1 by default
 60:  9c92cb40c1 =  85:  247710ed7f Fix Windows version resources
 99:  d5cebecf89 =  86:  78d7f579f7 status: fix for old-style submodules with commondir
100:  07e2467520 =  87:  8f556d4ee5 git.rc: include winuser.h
101:  639499b468 =  88:  d36dedb742 mingw: do load libcurl dynamically by default
102:  7e2b2db9a8 =  89:  9dbdae6675 Add a GitHub workflow to verify that Git/Scalar work in Nano Server
103:  fe9712514f =  90:  6dfbebeaa7 mingw: suggest `windows.appendAtomically` in more cases
104:  2d258077e3 =  91:  8e181c3b83 win32: use native ANSI sequence processing, if possible
105:  4997709d2a =  92:  0e35d82959 common-main.c: fflush stdout buffer upon exit
106:  e33e2cbc30 =  93:  d35dae331d t5601/t7406(mingw): do run tests with symlink support
107:  bbc884fc42 =  94:  a639d2b220 win32: ensure that `localtime_r()` is declared even in i686 builds
108:  eb880ef824 =  95:  8a82af1760 Fallback to AppData if XDG_CONFIG_HOME is unset
109:  e02837fc00 =  96:  604d88c962 run-command: be helpful with Git LFS fails on Windows 7
 76:  a4e02fa4c5 =  97:  6cabe0db80 survey: stub in new experimental 'git-survey' command
 77:  d31d5fb439 =  98:  20b68a3236 survey: add command line opts to select references
 79:  54a5741dcc =  99:  7bc2bfcb59 survey: start pretty printing data in table form
 81:  d45baea2be = 100:  33f884e409 survey: add object count summary
 83:  f6929a2aab = 101:  d54427e8bc survey: summarize total sizes by object type
 85:  c161add0d2 = 102:  c0b1a22afa survey: show progress during object walk
 86:  79cd4c4f15 = 103:  0a773ac5e8 mingw: make sure `errno` is set correctly when socket operations fail
 89:  28c4fc0a2d = 104:  0f0dc89c37 survey: add ability to track prioritized lists
 90:  82908ebeee = 105:  5879d46e5c compat/mingw: handle WSA errors in strerror
 93:  b2d8e6b04f = 106:  6333ed865d survey: add report of "largest" paths
 94:  38c30a8fd7 = 107:  790338eee7 compat/mingw: drop outdated comment
 97:  3e7cbaec99 = 108:  60c9f9a5df survey: add --top=<N> option and config
 98:  03f67a54ed = 109:  df13e7c8c3 t0301: actually test credential-cache on Windows
110:  05f496aba8 = 110:  31bddc7a1d survey: clearly note the experimental nature in the output
111:  04739c3e16 = 111:  65b889f1a2 credential-cache: handle ECONNREFUSED gracefully
112:  d7d8285d82 = 112:  9ba25181bc reftable: do make sure to use custom allocators
113:  4478cc1c87 = 113:  3e3c357910 check-whitespace: avoid alerts about upstream commits
114:  f31c69c853 = 114:  5f170c5903 t/t5571-prep-push-hook.sh: Add test with writing to stderr
115:  bc4d74c791 = 115:  6e10d5fd47 git-svn: mark it as unsupported by the Git for Windows project
116:  cdf2fbdbdf = 116:  8d0981b22f ci(macos): skip the `git p4` tests
117:  015ee4801e = 117:  3ee8f20ce7 Win32: make FILETIME conversion functions public
118:  1178876ae6 = 118:  68e0c8de71 Win32: dirent.c: Move opendir down
119:  61fca1b2f9 = 119:  15f2deeb95 mingw: make the dirent implementation pluggable
120:  1dd94f77a4 = 120:  84cc3ddedb Win32: make the lstat implementation pluggable
121:  2a4ffc311f = 121:  672a15e3aa mingw: add infrastructure for read-only file system level caches
122:  b1708bec38 = 122:  fd9442a7fc mingw: add a cache below mingw's lstat and dirent implementations
123:  bd068881d3 = 123:  c69b59cbd8 fscache: load directories only once
124:  0b1677f3fc = 124:  e067f8b778 fscache: add key for GIT_TRACE_FSCACHE
125:  83f3fbfead = 125:  a70400c404 fscache: remember not-found directories
126:  4e6205f9df = 126:  e80ed2f526 fscache: add a test for the dir-not-found optimization
127:  ee7d745d38 = 127:  2f7f09ffda add: use preload-index and fscache for performance
128:  01fea4d761 = 128:  550ea26d03 dir.c: make add_excludes aware of fscache during status
129:  bc7677591e = 129:  3bdb199c5e fscache: make fscache_enabled() public
130:  cbc28febe9 = 130:  49cdfa4d91 dir.c: regression fix for add_excludes with fscache
131:  b6386b1d6b = 131:  3545798daf fetch-pack.c: enable fscache for stats under .git/objects
132:  0fc964598e = 132:  56c54f0cbf checkout.c: enable fscache for checkout again
147:  3bea585fc5 = 133:  33078a05aa git-gui--askyesno: fix funny text wrapping
133:  ad9047dcd8 = 134:  a10d9a41ee Enable the filesystem cache (fscache) in refresh_index().
149:  594f555894 = 135:  1a271fc2fb git-gui--askyesno (mingw): use Git for Windows' icon, if available
134:  8d9ff1d99b = 136:  a95507ce5f fscache: use FindFirstFileExW to avoid retrieving the short name
135:  b162ed4f95 = 137:  832878d6e5 fscache: add GIT_TEST_FSCACHE support
136:  d1a985d4da = 138:  54f00ff0f1 fscache: add fscache hit statistics
137:  b142a058ea = 139:  1703cb36d5 unpack-trees: enable fscache for sparse-checkout
138:  c1ced6f536 = 140:  3e2e1ae1ee status: disable and free fscache at the end of the status command
139:  37127eca40 = 141:  c06db4dc40 mem_pool: add GIT_TRACE_MEMPOOL support
140:  13c6ef81d6 = 142:  d81a37eb87 fscache: fscache takes an initial size
141:  2b7c87da9c = 143:  046e8b58c2 fscache: update fscache to be thread specific instead of global
142:  3c401faabd = 144:  37f3efb435 fscache: teach fscache to use mempool
143:  57fb6d022e = 145:  3fa449ae80 fscache: make fscache_enable() thread safe
144:  0bae4cc651 = 146:  ff0de7f72e fscache: teach fscache to use NtQueryDirectoryFile
145:  995e1e8804 = 147:  aa4e0be1a4 fscache: remember the reparse tag for each entry
146:  1c17acd73b = 148:  e7cdf235be fscache: implement an FSCache-aware is_mount_point()
148:  b99a8bec82 = 149:  61f941dec2 clean: make use of FSCache
150:  79b7a83e75 = 150:  ee5d4f2e9a pack-objects (mingw): demonstrate a segmentation fault with large deltas
151:  3087972f4c = 151:  614aee7dba mingw: support long paths
152:  7510e75074 = 152:  317f5ed931 win32(long path support): leave drive-less absolute paths intact
153:  475c665ce3 = 153:  56522d25cd compat/fsmonitor/fsm-*-win32: support long paths
154:  ebf8ed9fb3 = 154:  0512711de5 clean: suggest using `core.longPaths` if paths are too long to remove
155:  a3607cf6eb = 155:  8633a56e1a mingw: Support `git_terminal_prompt` with more terminals
156:  54d1ac06c1 = 156:  9c4eb8d225 compat/terminal.c: only use the Windows console if bash 'read -r' fails
157:  dfb12d08bb = 157:  bb493b4770 mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
158:  3051e7850c = 158:  bd64d1a0e6 Win32: symlink: move phantom symlink creation to a separate function
159:  b7538d04a1 = 159:  4a8cc32f02 Introduce helper to create symlinks that knows about index_state
160:  53c62e2727 = 160:  0e4f4ad127 mingw: allow to specify the symlink type in .gitattributes
161:  b13894e06d = 161:  c5817cdcf1 Win32: symlink: add test for `symlink` attribute
162:  ff6cda24b3 = 162:  946ea02305 mingw: explicitly specify with which cmd to prefix the cmdline
163:  93a95d5d09 = 163:  c5a4df70af mingw: when path_lookup() failed, try BusyBox
164:  26216527f0 = 164:  9c9433bc0e test-tool: learn to act as a drop-in replacement for `iconv`
165:  3218234cf3 = 165:  087be59298 tests(mingw): if `iconv` is unavailable, use `test-helper --iconv`
166:  819fad8980 = 166:  270836d827 gitattributes: mark .png files as binary
167:  14aa807aac = 167:  251d62e700 tests: move test PNGs into t/lib-diff/
168:  76df238896 = 168:  0aa0684b43 tests: only override sort & find if there are usable ones in /usr/bin/
169:  a803b66c9e = 169:  c17313b374 tests: use the correct path separator with BusyBox
170:  d585387546 = 170:  a0fb554f20 mingw: only use Bash-ism `builtin pwd -W` when available
174:  c125e88d34 = 171:  1f2858a5d9 mingw: introduce code to detect whether we're inside a Windows container
171:  dc8dd7f4cf = 172:  43b959495e tests (mingw): remove Bash-specific pwd option
176:  622ba94fe9 = 173:  b8cf5234b4 mingw: when running in a Windows container, try to rename() harder
172:  765b0e21aa = 174:  6ff742c94a test-lib: add BUSYBOX prerequisite
178:  e74e00283d = 175:  091a5ca166 mingw: move the file_attr_to_st_mode() function definition
173:  8138d8c790 = 176:  270531559b t5003: use binary file from t/lib-diff/
180:  8f0fb1c743 = 177:  21bda4ccb7 mingw: Windows Docker volumes are *not* symbolic links
175:  14909a0773 = 178:  c65ed24ca8 t5532: workaround for BusyBox on Windows
183:  c686b20079 = 179:  40c42d0b6c mingw: work around rename() failing on a read-only file
177:  3971db3bb9 = 180:  64c46be052 t5605: special-case hardlink test for BusyBox-w32
179:  8284980837 = 181:  ead64da5e7 t5813: allow for $PWD to be a Windows path
181:  bc05adef74 = 182:  7b1cf1fc4e t9200: skip tests when $PWD contains a colon
187:  081cd06f04 = 183:  4cd257db2e Describe Git for Windows' architecture [no ci]
182:  5d526bf688 = 184:  568830ee58 mingw: kill child processes in a gentler way
184:  de9ba87821 = 185:  c149d40819 mingw: optionally enable wsl compability file mode bits
188:  ac98f0977c = 186:  95573196a3 Modify the Code of Conduct for Git for Windows
185:  94c98fb8ed = 187:  a954d65121 mingw: really handle SIGINT
189:  d1e37e58b8 = 188:  c8a137c322 CONTRIBUTING.md: add guide for first-time contributors
186:  10c70406c3 = 189:  3306f054dc Partially un-revert "editor: save and reset terminal after calling EDITOR"
190:  cd76309252 = 190:  ae1cd62b6e README.md: Add a Windows-specific preamble
191:  0d066b2818 = 191:  75f331fce9 reset: reinstate support for the deprecated --stdin option
192:  3fb3a97776 = 192:  5e6ae586a0 Add an issue template
193:  bbe5dc0bf8 = 193:  b5cfa0712a Add a GitHub workflow to monitor component updates
194:  67600a3e25 = 194:  5c52791592 fsmonitor: reintroduce core.useBuiltinFSMonitor
195:  684996020e = 195:  2de120217d Modify the GitHub Pull Request template (to reflect Git for Windows)
196:  01885d1225 = 196:  480522a12a dependabot: help keeping GitHub Actions versions up to date
197:  ee23e21a20 = 197:  d5cb976056 SECURITY.md: document Git for Windows' policies

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

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

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

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

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

should clone into C:\G4W.

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Windows' equivalent to "bind mounts", NTFS junction points, can be
unlinked without affecting the mount target. This is clearly what users
expect to happen when they call `git clean -dfx` in a worktree that
contains NTFS junction points: the junction should be removed, and the
target directory of said junction should be left alone (unless it is
inside the worktree).

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

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

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

31.166991900 27.576763800 28.712311000 27.373859000 27.163141900

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

31.915032900 27.149883100 28.244933700 27.240188800 28.580849500

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

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

943.426 978.500 939.709 959.811 954.605

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

995.383 952.179 943.253 963.043 980.468

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

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

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

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

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

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

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

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

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

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

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

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

This fixes git-for-windows#2481.

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

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

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

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

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

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

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

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

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

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

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

This fixes git-for-windows#2779

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

A simple retry will usually resolve the issue.

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

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

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

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

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

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Vilius Šumskas <vilius@sumskas.eu>
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>
Ensure key CMake option values are part of the CMake output to
facilitate user support when tool updates impact the wider CMake
actions, particularly ongoing 'improvements' in Visual Studio.

These CMake displays perform the same function as the build-options.txt
provided in the main Git for Windows. CMake is already chatty.
The setting of CMAKE_EXPORT_COMPILE_COMMANDS is also reported.

Include the environment's CMAKE_EXPORT_COMPILE_COMMANDS value which
may have been propogated to CMake's internal value.

Testing the CMAKE_EXPORT_COMPILE_COMMANDS processing can be difficult
in the Visual Studio environment, as it may be cached in many places.
The 'environment' may include the OS, the user shell, CMake's
own environment, along with the Visual Studio presets and caches.

See previous commit for arefacts that need removing for a clean test.

Signed-off-by: Philip Oakley <philipoakley@iee.email>
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>
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>
dscho and others added 30 commits March 6, 2026 01:51
When t5605 tries to verify that files are hardlinked (or that they are
not), it uses the `-links` option of the `find` utility.

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

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

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