Skip to content

Rebase shears/seen (#23077583661)#42

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

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

Conversation

@gitforwindowshelper
Copy link
Copy Markdown

Workflow run

Rebase Summary: seen

From: 2b223b6cb4 (Merge 'readme' into HEAD, 2018-06-07) (7f47ccba95..2b223b6cb4)
To: cd06f763dc (Merge 'readme' into HEAD, 2018-06-07) (4d5a037d33..cd06f763dc)

Statistics

Metric Count
Total conflicts 0
Skipped (upstreamed) 0
Resolved surgically 0
Range-diff (click to expand)
  1:  a844164ce3 =   1:  7281c23feb unix-socket: avoid leak when initialization fails
  2:  f7406eae2f =   2:  93eb6ffed4 grep: prevent `^$` false match at end of file
 14:  8419f1bcc7 =   3:  e980c4a22f mingw: include the Python parts in the build
 16:  c8fd783dfc =   4:  9ed60b4e9f win32/pthread: avoid name clashes with winpthread
 19:  98974df40f =   5:  ea25ba74d9 git-compat-util: avoid redeclaring _DEFAULT_SOURCE
 22:  b28d246b7d =   6:  cee79a182b Import the source code of mimalloc v2.2.7
  3:  7c406d3313 =   7:  a424301525 t9350: point out that refs are not updated correctly
 25:  3273af825a =   8:  bcb5e2101d mimalloc: adjust for building inside Git
  4:  514090f2b0 =   9:  ad0a03cb56 transport-helper: add trailing --
 29:  e7ee9dccdc =  10:  e336a5a4ba mimalloc: offer a build-time option to enable it
  5:  b8c2c511ef =  11:  ac8ba7d00e remote-helper: check helper status after import/export
  6:  e0b22bd7ee =  12:  25ae9dfa97 clean: do not traverse mount points
 37:  2738f6077f =  13:  8aca34d114 mingw: use mimalloc
  7:  6a19732cf2 =  14:  47abfee063 Always auto-gc after calling a fast-import transport
  8:  a99c44881f =  15:  2753498171 mingw: prevent regressions with "drive-less" absolute paths
 39:  ce9627f215 =  16:  0206856990 clean: remove mount points when possible
 40:  f851d73083 =  17:  559eb6947c transport: optionally disable side-band-64k
  9:  998be62a85 =  18:  b98017fd64 vcpkg_install: detect lack of Git
 10:  d8c8cd774c =  19:  d0ae7ce795 vcpkg_install: add comment regarding slow network connections
 11:  113b60c49d =  20:  cddd20a55f vcbuild: install ARM64 dependencies when building ARM64 binaries
 12:  e362ea5185 =  21:  410de5454f vcbuild: add an option to install individual 'features'
 13:  412abee1d7 =  22:  40f30762ac cmake: allow building for Windows/ARM64
 15:  fd9686ab22 =  23:  27cee135d7 ci(vs-build) also build Windows/ARM64 artifacts
 17:  b0dbf734ef =  24:  111b85603c Add schannel to curl installation
 18:  874b36364f =  25:  3d384d1197 hash-object: demonstrate a >4GB/LLP64 problem
 57:  4ca1119d9f =  26:  6883a04ed1 windows: skip linking `git-<command>` for built-ins
 20:  5ca504e3c0 =  27:  53cbf3a3e4 cmake(): allow setting HOST_CPU for cross-compilation
 21:  d62862c659 =  28:  a84b85c8dd object-file.c: use size_t for header lengths
 58:  796952e9ac =  29:  ef3ab2baad mingw: stop hard-coding `CC = gcc`
 23:  54ddad68d0 =  30:  c0e53ea132 CMake: default Visual Studio generator has changed
 24:  edeb6ff212 =  31:  b62dc78fe6 hash algorithms: use size_t for section lengths
 59:  4c240dd949 =  32:  d5cecf5667 mingw: drop the -D_USE_32BIT_TIME_T option
 26:  57b4816c59 =  33:  22393807be mingw: demonstrate a `git add` issue with NTFS junctions
 27:  3fbbb16930 =  34:  0a447b20d5 .gitignore: add Visual Studio CMakeSetting.json file
 28:  1c7dd686c3 =  35:  c668a4fefe hash-object --stdin: verify that it works with >4GB/LLP64
 60:  5597131c72 =  36:  fe93bd6807 mingw: only use -Wl,--large-address-aware for 32-bit builds
 30:  a0c2017373 =  37:  40d12a49f7 t5505/t5516: allow running without `.git/branches/` in the templates
 31:  c8ed0922df =  38:  b0780eb4a3 strbuf_realpath(): use platform-dependent API if available
 32:  5032a7055e =  39:  ec897a400c http: use new "best effort" strategy for Secure Channel revoke checking
 33:  99d5b3a6d4 =  40:  5771262e15 subtree: update `contrib/subtree` `test` target
 34:  b0218fe04e =  41:  ffae0e7b20 CMakeLists: add default "x64-windows" arch for Visual Studio
 35:  14481efba2 =  42:  55f75f1673 hash-object: add another >4GB/LLP64 test case
 36:  2bbd899521 =  43:  de6a9b59ba setup: properly use "%(prefix)/" when in WSL
 89:  5a2433c1c6 =  44:  f045f3bc4b Add config option `windows.appendAtomically`
 61:  ef3d29e436 =  45:  b34bf7c508 mingw: avoid over-specifying `--pic-executable`
 38:  77fd5cedb8 =  46:  a55d55c36c t5505/t5516: fix white-space around redirectors
 81:  abab5f801e =  47:  7f5613744f MinGW: link as terminal server aware
 41:  cfb540bb6f =  48:  67dee55086 mingw: fix fatal error working on mapped network drives on Windows
 42:  384bedb9b9 =  49:  14c728feb9 clink.pl: fix MSVC compile script to handle libcurl-d.lib
 43:  a5239f27e5 =  50:  a566c0b512 mingw: implement a platform-specific `strbuf_realpath()`
 44:  7ea329569b =  51:  6e93d35723 t3701: verify that we can add *lots* of files interactively
 45:  c28c099b07 =  52:  8fe2ffbdd1 commit: accept "scissors" with CR/LF line endings
 46:  f47530c8c2 =  53:  fe6399a4a9 t0014: fix indentation
 47:  0fd9949712 =  54:  fdba59d9de git-gui: accommodate for intent-to-add files
 48:  e838ba6389 =  55:  82d38bfbe8 mingw: allow for longer paths in `parse_interpreter()`
 49:  ea142cfc2a =  56:  ff09a1828c compat/vcbuild: document preferred way to build in Visual Studio
 50:  e3d34e08f1 =  57:  05782fe052 http: optionally send SSL client certificate
 51:  b884260915 =  58:  5770a1d5cf ci: run `contrib/subtree` tests in CI builds
 52:  6bc30b85a7 =  59:  a40cd69714 CMake: show Win32 and Generator_platform build-option values
 53:  cdc7364aea =  60:  3c1ba32249 hash-object: add a >4GB/LLP64 test case using filtered input
 54:  4985afd67d =  61:  9215bcf71e compat/mingw.c: do not warn when failing to get owner
 55:  b4c11af77b =  62:  f6b15a2809 mingw: $env:TERM="xterm-256color" for newer OSes
 56:  d35436f6d9 =  63:  49f6047a24 winansi: check result and Buffer before using Name
 94:  d177c23483 =  64:  8f40402eef mingw: change core.fsyncObjectFiles = 1 by default
 95:  7b64702f65 =  65:  e6eab3a49d Fix Windows version resources
 96:  bb65f510be =  66:  b057a6afc8 status: fix for old-style submodules with commondir
 62:  ecaf9797c0 =  67:  4d88aa0bab mingw: set the prefix and HOST_CPU as per MSYS2's settings
 63:  db3458a937 =  68:  81d61da37c mingw: only enable the MSYS2-specific stuff when compiling in MSYS2
 64:  431866451d =  69:  2bcda10091 mingw: rely on MSYS2's metadata instead of hard-coding it
 65:  2df9ed1cd6 =  70:  52a97d136a mingw: always define `ETC_*` for MSYS2 environments
 66:  4fec919085 =  71:  711f5292ad max_tree_depth: lower it for clang builds in general on Windows
 67:  e1dca18d99 =  72:  b84a02c385 mingw: ensure valid CTYPE
 68:  e95dbf182c =  73:  52708d1dae ci: work around a problem with HTTP/2 vs libcurl v8.10.0
 69:  0e1205f39e =  74:  8b3803f743 mingw: allow `git.exe` to be used instead of the "Git wrapper"
 70:  31d765d100 =  75:  15eda0f662 revision: create mark_trees_uninteresting_dense()
 71:  db079223f1 =  76:  8c38487361 mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory
 72:  dbb836117c =  77:  5c024c963d survey: stub in new experimental 'git-survey' command
 73:  9f656a14a3 =  78:  8ca0bf4607 survey: add command line opts to select references
 74:  9ee127f87b =  79:  a7f0180bc9 clink.pl: fix libexpatd.lib link error when using MSVC
 75:  9f21d3174d =  80:  2373751cdb survey: start pretty printing data in table form
 76:  03389b8d86 =  81:  52b36c4b3a Makefile: clean up .ilk files when MSVC=1
 77:  ddb68bf6b0 =  82:  7f16a7187c survey: add object count summary
 78:  faa86d5ce2 =  83:  ad427864c4 vcbuild: add support for compiling Windows resource files
 79:  6b10e40b6b =  84:  a0ea59d551 survey: summarize total sizes by object type
 80:  3f579bd0ef =  85:  83c7f754a0 config.mak.uname: add git.rc to MSVC builds
 82:  a46c388ac4 =  86:  78d874375d survey: show progress during object walk
 93:  7d0a8eeb46 =  87:  96fbcd1386 mingw: make sure `errno` is set correctly when socket operations fail
 83:  c5579b6961 =  88:  2b4ee9b188 clink.pl: ignore no-stack-protector arg on MSVC=1 builds
 84:  999eeb3aa9 =  89:  1623443ef3 http: optionally load libcurl lazily
 85:  ac67b9f9ff =  90:  665e187cc8 survey: add ability to track prioritized lists
108:  60efa8020d =  91:  82d3510adc compat/mingw: handle WSA errors in strerror
 86:  e92379ff16 =  92:  7e5642899f clink.pl: move default linker options for MSVC=1 builds
 87:  0fe6325225 =  93:  03922fad44 http: support lazy-loading libcurl also on Windows
 88:  278cae60e9 =  94:  f9cec210a8 survey: add report of "largest" paths
109:  88004f579f =  95:  0c79ab251a compat/mingw: drop outdated comment
 90:  279b698359 =  96:  e1ee0285f8 cmake: install headless-git.
 91:  4662f086ea =  97:  2bf8faa17a http: when loading libcurl lazily, allow for multiple SSL backends
 92:  d8d487976c =  98:  a3cce6f132 survey: add --top=<N> option and config
110:  54e314b9cf =  99:  0076183b1d t0301: actually test credential-cache on Windows
 97:  1b8bcaa2c7 = 100:  7327d7a90b git.rc: include winuser.h
 98:  0f5edba3c7 = 101:  1aa140ed49 mingw: do load libcurl dynamically by default
 99:  673050dd24 = 102:  6efb80a400 Add a GitHub workflow to verify that Git/Scalar work in Nano Server
100:  a6b0ab85fe = 103:  f82557f6d2 mingw: suggest `windows.appendAtomically` in more cases
101:  51b628aa50 = 104:  1ab18d9303 win32: use native ANSI sequence processing, if possible
102:  0f93a00e93 = 105:  256e483937 common-main.c: fflush stdout buffer upon exit
103:  9076da5950 = 106:  a6cecf1099 t5601/t7406(mingw): do run tests with symlink support
104:  9258b22a94 = 107:  9957d191a2 win32: ensure that `localtime_r()` is declared even in i686 builds
105:  667b1d777d = 108:  16ee6eaab4 Fallback to AppData if XDG_CONFIG_HOME is unset
106:  dfd1bdeb62 = 109:  5ae4f3b3a4 run-command: be helpful with Git LFS fails on Windows 7
107:  4064258c8f = 110:  5ffc927a0e survey: clearly note the experimental nature in the output
111:  21c09294e0 = 111:  a5aa30a640 credential-cache: handle ECONNREFUSED gracefully
112:  b8de14d9a5 = 112:  5cbe8649c6 reftable: do make sure to use custom allocators
113:  a504198168 = 113:  987d2e689f check-whitespace: avoid alerts about upstream commits
114:  9ae4c7fefa = 114:  dd3279601c t/t5571-prep-push-hook.sh: Add test with writing to stderr
115:  4f9bc5542d = 115:  a872ecc696 git-svn: mark it as unsupported by the Git for Windows project
116:  4db1073cf9 = 116:  aa428b8919 ci(macos): skip the `git p4` tests
117:  ead7cd0b93 = 117:  b6a6deb41f Win32: make FILETIME conversion functions public
118:  65c4ba0f61 = 118:  ef3718bb2c Win32: dirent.c: Move opendir down
119:  73c818f567 = 119:  efc48895b8 mingw: make the dirent implementation pluggable
120:  62279c3b48 = 120:  4949ca199c Win32: make the lstat implementation pluggable
121:  7f4fe25fa6 = 121:  3003fe4155 mingw: add infrastructure for read-only file system level caches
122:  a182a1bf01 = 122:  3260ca5fa8 mingw: add a cache below mingw's lstat and dirent implementations
162:  a0372b5aec = 123:  e0478fb57d git-gui--askyesno: fix funny text wrapping
123:  c54c65f513 = 124:  3dbb0d1149 fscache: load directories only once
165:  8a54d972df = 125:  77c9937164 git-gui--askyesno (mingw): use Git for Windows' icon, if available
124:  fedc8667ff = 126:  a9e2b00249 fscache: add key for GIT_TRACE_FSCACHE
125:  1b0a1cc1fa = 127:  f3b56d8635 fscache: remember not-found directories
126:  2244163426 = 128:  e238dbec12 fscache: add a test for the dir-not-found optimization
127:  6e9d47f952 = 129:  74d2fc0850 add: use preload-index and fscache for performance
128:  4d27d7f75d = 130:  c1bf1d288b dir.c: make add_excludes aware of fscache during status
129:  234e72663c = 131:  0f65fe1d19 fscache: make fscache_enabled() public
130:  49bfe68675 = 132:  6f7c43cc61 dir.c: regression fix for add_excludes with fscache
131:  afae96cdce = 133:  1f79c9196b fetch-pack.c: enable fscache for stats under .git/objects
132:  c62c5e7899 = 134:  c9a6bd69b2 checkout.c: enable fscache for checkout again
133:  24581f4eb0 = 135:  6c4b7cde23 Enable the filesystem cache (fscache) in refresh_index().
134:  2259ea9286 = 136:  39a0c9cbf2 fscache: use FindFirstFileExW to avoid retrieving the short name
135:  410f33bd3f = 137:  201f5c472b fscache: add GIT_TEST_FSCACHE support
136:  78c42f1c29 = 138:  f6a795acb3 fscache: add fscache hit statistics
137:  3b2df4fc7b = 139:  c389b75c47 unpack-trees: enable fscache for sparse-checkout
138:  107317bf79 = 140:  6088205f80 status: disable and free fscache at the end of the status command
139:  4713ee5654 = 141:  47813f7bd1 mem_pool: add GIT_TRACE_MEMPOOL support
140:  528c0de054 = 142:  8fb25e60e5 fscache: fscache takes an initial size
141:  e62054a21d = 143:  d387343a71 fscache: update fscache to be thread specific instead of global
142:  c8a9a60d3d = 144:  4cf1421acc fscache: teach fscache to use mempool
143:  83599b0dc4 = 145:  f5021caae3 fscache: make fscache_enable() thread safe
144:  7c17369bb3 = 146:  c7658b1394 fscache: teach fscache to use NtQueryDirectoryFile
145:  77514e3700 = 147:  06761e28b6 fscache: remember the reparse tag for each entry
146:  118967f065 = 148:  115ebb8b58 fscache: implement an FSCache-aware is_mount_point()
147:  20bad77b57 = 149:  576112b418 clean: make use of FSCache
148:  36c406f643 = 150:  6073fa9ae6 pack-objects (mingw): demonstrate a segmentation fault with large deltas
149:  8945aa662a = 151:  924dc8e573 mingw: support long paths
150:  d2206bafe6 = 152:  af190dabff win32(long path support): leave drive-less absolute paths intact
151:  f54a5b9385 = 153:  3563252322 compat/fsmonitor/fsm-*-win32: support long paths
152:  2c80781bd3 = 154:  bbb3bd43c4 clean: suggest using `core.longPaths` if paths are too long to remove
153:  c3553eced1 = 155:  cd73956c13 mingw: Support `git_terminal_prompt` with more terminals
154:  bfe4c67798 = 156:  aeef152bbe compat/terminal.c: only use the Windows console if bash 'read -r' fails
155:  9743858f84 = 157:  24f4eb694c mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
156:  ba222a0c9b = 158:  dd078740f6 Win32: symlink: move phantom symlink creation to a separate function
157:  c48082b1ab = 159:  14967e7515 Introduce helper to create symlinks that knows about index_state
159:  f7506a7c0f = 160:  f0320d3186 mingw: allow to specify the symlink type in .gitattributes
161:  6de601604d = 161:  e7308a3220 Win32: symlink: add test for `symlink` attribute
164:  0982676de9 = 162:  ad83d7cd2e mingw: explicitly specify with which cmd to prefix the cmdline
167:  df6b46a3bd = 163:  c19d680661 mingw: when path_lookup() failed, try BusyBox
169:  f6014edfa6 = 164:  1a426b87bd test-tool: learn to act as a drop-in replacement for `iconv`
170:  1b410ed028 = 165:  f398444769 tests(mingw): if `iconv` is unavailable, use `test-helper --iconv`
171:  47d8bbe32f = 166:  71ef04977c gitattributes: mark .png files as binary
172:  cbeec4e6e0 = 167:  f03ef538a2 tests: move test PNGs into t/lib-diff/
158:  793908585c = 168:  471c8f9db8 mingw: introduce code to detect whether we're inside a Windows container
173:  9193262013 = 169:  3758dbab26 tests: only override sort & find if there are usable ones in /usr/bin/
160:  1500279eed = 170:  13aeaac66e mingw: when running in a Windows container, try to rename() harder
174:  b2f4d5ef3b = 171:  b5bae7ab62 tests: use the correct path separator with BusyBox
163:  ac2b517cdf = 172:  4bdcd167f9 mingw: move the file_attr_to_st_mode() function definition
175:  77de595eb0 = 173:  676a129954 mingw: only use Bash-ism `builtin pwd -W` when available
166:  739f8c5c23 = 174:  a1d278ceb4 mingw: Windows Docker volumes are *not* symbolic links
176:  137fe60b11 = 175:  7e00c000b6 tests (mingw): remove Bash-specific pwd option
168:  cc834c5dc8 = 176:  14251c642f mingw: work around rename() failing on a read-only file
177:  0453254edd = 177:  f8a99af914 test-lib: add BUSYBOX prerequisite
178:  209cb7d233 = 178:  556c62f93c t5003: use binary file from t/lib-diff/
179:  6ee779a23b = 179:  a96e208bb5 t5532: workaround for BusyBox on Windows
181:  20bac58a79 = 180:  ccf9126685 t5605: special-case hardlink test for BusyBox-w32
183:  83d896fd74 = 181:  492b62742f t5813: allow for $PWD to be a Windows path
185:  024b79ecf0 = 182:  b6302efd3d t9200: skip tests when $PWD contains a colon
180:  e7f5b3b565 = 183:  e202f9fc81 Describe Git for Windows' architecture [no ci]
187:  4f6043a5b6 = 184:  67c07632ad mingw: kill child processes in a gentler way
188:  a0751b4718 = 185:  ba149506f1 mingw: optionally enable wsl compability file mode bits
182:  64978dc8b9 = 186:  7a8a214b1d Modify the Code of Conduct for Git for Windows
190:  179ab81cd8 = 187:  25648e74db mingw: really handle SIGINT
184:  ef923eb778 = 188:  b9b082a1c6 CONTRIBUTING.md: add guide for first-time contributors
193:  5a096be4cd = 189:  998a67311b Partially un-revert "editor: save and reset terminal after calling EDITOR"
186:  37741bf284 = 190:  a19dc343ed README.md: Add a Windows-specific preamble
194:  2657d0f603 = 191:  5a30cc116b reset: reinstate support for the deprecated --stdin option
189:  ba53b56568 = 192:  2c86b3e6e0 Add an issue template
191:  21d948712c = 193:  94c3bb6b4f Add a GitHub workflow to monitor component updates
195:  30e5c1984b = 194:  afaa1e9937 fsmonitor: reintroduce core.useBuiltinFSMonitor
192:  b054b54e7e = 195:  0271800d54 Modify the GitHub Pull Request template (to reflect Git for Windows)
196:  7dbeb775ca = 196:  366d502b2a dependabot: help keeping GitHub Actions versions up to date
197:  221a738795 = 197:  32a1777760 SECURITY.md: document Git for Windows' policies

PhilipOakley and others added 30 commits March 14, 2026 01:46
Continue walking the code path for the >4GB `hash-object --literally`
test to the hash algorithm step for LLP64 systems.

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

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

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

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

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

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

Signed-off-by: Philip Oakley <philipoakley@iee.email>
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>
NTFS junctions are somewhat similar in spirit to Unix bind mounts: they
point to a different directory and are resolved by the filesystem
driver. As such, they appear to `lstat()` as if they are directories,
not as if they are symbolic links.

_Any_ user can create junctions, while symbolic links can only be
created by non-administrators in Developer Mode on Windows 10. Hence
NTFS junctions are much more common "in the wild" than NTFS symbolic
links.

It was reported in git-for-windows#2481
that adding files via an absolute path that traverses an NTFS junction:
since 1e64d18 (mingw: do resolve symlinks in `getcwd()`), we resolve not
only symbolic links but also NTFS junctions when determining the
absolute path of the current directory. The same is not true for `git
add <file>`, where symbolic links are resolved in `<file>`, but not NTFS
junctions.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The CMakeSettings.json file is tool generated. Developers may track it
should they provide additional settings.

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

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

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

Signed-off-by: Philip Oakley <philipoakley@iee.email>
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>
Some platforms (e.g. Windows) provide API functions to resolve paths
much quicker. Let's offer a way to short-cut `strbuf_realpath()` on
those platforms.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When we commit the template directory as part of `make vcxproj`, the
`branches/` directory is not actually commited, as it is empty.

Two tests were not prepared for that situation.

This developer tried to get rid of the support for `.git/branches/` a
long time ago, but that effort did not bear fruit, so the best we can do
is work around in these here tests.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The vcpkg_install batch file depends on the availability of a
working Git on the CMD path. This may not be present if the user
has selected the 'bash only' option during Git-for-Windows install.

Detect and tell the user about their lack of a working Git in the CMD
window.

Fixes git-for-windows#2348.
A separate PR git-for-windows/build-extra#258
now highlights the recommended path setting during install.

Signed-off-by: Philip Oakley <philipoakley@iee.email>
There are no Windows/ARM64 agents in GitHub Actions yet, therefore we
just skip adjusting the `vs-test` job for now.

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The intention of this change is to align with how the top-level git
`Makefile` defines its own test target (which also internally calls
`$(MAKE) -C t/ all`). This change also ensures the consistency of
`make -C contrib/subtree test` with other testing in CI executions
(which rely on `$DEFAULT_TEST_TARGET` being defined as `prove`).

Signed-off-by: Victoria Dye <vdye@github.com>
In Git-for-Windows, work on using ARM64 has progressed. The
commit 2d94b77 (cmake: allow building for Windows/ARM64, 2020-12-04)
failed to notice that /compat/vcbuild/vcpkg_install.bat will default to
using the "x64-windows" architecture for the vcpkg installation if not set,
but CMake is not told of this default. Commit 635b6d9 (vcbuild: install
ARM64 dependencies when building ARM64 binaries, 2020-01-31) later updated
vcpkg_install.bat to accept an arch (%1) parameter, but retained the default.

This default is neccessary for the use case where the project directory is
opened directly in Visual Studio, which will find and build a CMakeLists.txt
file without any parameters, thus expecting use of the default setting.

Also Visual studio will generate internal .sln solution and .vcxproj project
files needed for some extension tools. Inform users of the additional
.sln/.vcxproj generation.

** How to test:
 rm -rf '.vs' # remove old visual studio settings
 rm -rf 'compat/vcbuild/vcpkg' # remove any vcpkg downloads
 rm -rf 'contrib/buildsystems/out' # remove builds & CMake artifacts
 with a fresh Visual Studio Community Edition, File>>Open>>(git *folder*)
   to load the project (which will take some time!).
 check for successful compilation.
The implicit .sln (etc.) are in the hidden .vs directory created by
Visual Studio.

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

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

Signed-off-by: Philip Oakley <philipoakley@iee.email>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Derrick Stolee <derrickstolee@github.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>
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>
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>
dscho and others added 30 commits March 14, 2026 01:46
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.