Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase to v2.43.0 #4698

Merged
merged 341 commits into from
Nov 20, 2023
Merged

Rebase to v2.43.0 #4698

merged 341 commits into from
Nov 20, 2023

Conversation

dscho
Copy link
Member

@dscho dscho commented Nov 20, 2023

The usual final rebase.

Range-diff relative to main
  • 1: 99ee771 = 1: 444adc1 gitk(Windows): avoid inadvertently calling executables in the worktree
  • 2: ce8f9dc = 2: 85ae9da t9350: point out that refs are not updated correctly
  • 3: cae5327 = 3: a805e55 transport-helper: add trailing --
  • 4: c7d6c08 = 4: d7249a4 remote-helper: check helper status after import/export
  • 5: d6eee39 = 5: 8069561 mingw: demonstrate a problem with certain absolute paths
  • 6: 839f23d = 6: e8e8cdd clean: do not traverse mount points
  • 9: 838f42d = 7: ba23ba8 mingw: include the Python parts in the build
  • 7: 807aeb0 = 8: 7d12a3e Always auto-gc after calling a fast-import transport
  • 8: 3c210cb = 9: 75dfd3f mingw: allow absolute paths without drive prefix
  • 14: fd87353 = 10: db74209 clean: remove mount points when possible
  • 10: 10fc29b = 11: 7c787d9 win32/pthread: avoid name clashes with winpthread
  • 11: e80f6ff = 12: 132b00b git-compat-util: avoid redeclaring _DEFAULT_SOURCE
  • 12: 4c10881 = 13: 3003051 Import the source code of mimalloc v2.0.9
  • 13: f246ffc = 14: 7e401c4 mimalloc: adjust for building inside Git
  • 15: 9958b62 = 15: 6b98696 mimalloc: offer a build-time option to enable it
  • 16: 33e787f = 16: f73e718 mimalloc: use "weak" random seed when statically linked
  • 17: 34e57b8 = 17: c5d6ddd mingw: use mimalloc
  • 18: bb20728 = 18: 462783b transport: optionally disable side-band-64k
  • 19: 0dba623 = 19: c6cd2ec mingw: make sure errno is set correctly when socket operations fail
  • 20: 6716c08 = 20: e48f6a3 mingw: do resolve symlinks in getcwd()
  • 21: dfba700 = 21: d49abb6 mingw: fix fatal error working on mapped network drives on Windows
  • 29: 363307d = 22: a9586c1 vcxproj: unclash project directories with build outputs
  • 22: 92a1845 = 23: e400b23 mingw: ensure valid CTYPE
  • 23: 21af934 = 24: 33d289a mingw: demonstrate a git add issue with NTFS junctions
  • 30: b1ec581 = 25: fa8ea8a t5505/t5516: allow running without .git/branches/ in the templates
  • 24: ace6eb2 = 26: cce2ba3 mingw: allow git.exe to be used instead of the "Git wrapper"
  • 25: a3c1c8a = 27: cdb733e strbuf_realpath(): use platform-dependent API if available
  • 31: af42f05 = 28: 4280e73 t5505/t5516: fix white-space around redirectors
  • 26: 91a2228 = 29: 1090ed7 mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory
  • 32: 10d7917 = 30: 26bc710 http: use new "best effort" strategy for Secure Channel revoke checking
  • 27: f2df755 = 31: a89c21b clink.pl: fix MSVC compile script to handle libcurl-d.lib
  • 28: f69939b = 32: 2b8d16d mingw: implement a platform-specific strbuf_realpath()
  • 33: 55f56cf = 33: 19664ce t3701: verify that we can add lots of files interactively
  • 37: 83c8531 = 34: 79ebcf0 clink.pl: fix libexpatd.lib link error when using MSVC
  • 38: b86c726 = 35: dc31b7e Makefile: clean up .ilk files when MSVC=1
  • 39: 767aa56 = 36: e408869 vcbuild: add support for compiling Windows resource files
  • 40: 79896dc = 37: b45a65c config.mak.uname: add git.rc to MSVC builds
  • 41: 7cceeac = 38: 23b55df clink.pl: ignore no-stack-protector arg on MSVC=1 builds
  • 42: dc06abb = 39: c04992b clink.pl: move default linker options for MSVC=1 builds
  • 34: a373fdd = 40: 7ec2d2e git add -i: handle CR/LF line endings in the interactive input
  • 35: cd1bcca = 41: 8b0ed82 commit: accept "scissors" with CR/LF line endings
  • 36: 7891bf2 = 42: c5bb002 t0014: fix indentation
  • 46: 6d79c57 = 43: 29f17b0 git-gui: accommodate for intent-to-add files
  • 47: d922675 = 44: 6b7a408 vcpkg_install: detect lack of Git
  • 48: e8fb9fb = 45: 92d2318 vcpkg_install: add comment regarding slow network connections
  • 49: 2e2b096 = 46: b343360 vcxproj: support building Windows/ARM64 binaries
  • 50: ad247ec = 47: 1854fdc vcbuild: install ARM64 dependencies when building ARM64 binaries
  • 43: 1ff138c = 48: 7cb087c buildsystems: remove duplicate clause
  • 51: 612dc26 = 49: 1ac32a1 vcbuild: add an option to install individual 'features'
  • 44: f1fa4a8 = 50: e931332 vcxproj: handle resource files, too
  • 52: 444757f = 51: c633044 cmake: allow building for Windows/ARM64
  • 45: 6a3c6c2 = 52: 65d1ba3 vcxproj: ignore -fno-stack-protector and -fno-common
  • 53: 33385e7 = 53: 14dfc96 ci(vs-build) also build Windows/ARM64 artifacts
  • 54: c19c356 = 54: 15b2818 vcxproj: handle GUI programs, too
  • 55: 99958df = 55: 4bda34f Add schannel to curl installation
  • 56: d5ea7c1 = 56: 1141548 cmake: install headless-git.
  • 57: f9645ad = 57: 049c05d cmake(): allow setting HOST_CPU for cross-compilation
  • 63: 0aa30b9 = 58: fa4226a CMake: default Visual Studio generator has changed
  • 64: aaacf2a = 59: acf2d02 .gitignore: add Visual Studio CMakeSetting.json file
  • 58: 8acb548 = 60: 4af23bb subtree: update contrib/subtree test target
  • 66: 0345392 = 61: 43ebef0 CMakeLists: add default "x64-windows" arch for Visual Studio
  • 59: 48e4eba = 62: 0be4169 ci(vs-build): download the vcpkg artifacts using a dedicated Action
  • 60: b86aa99 = 63: 690990d mingw: allow for longer paths in parse_interpreter()
  • 61: 29c0d0f = 64: 448b7b7 compat/vcbuild: document preferred way to build in Visual Studio
  • 62: 6c67799 = 65: 4cada36 http: optionally send SSL client certificate
  • 68: 033f003 = 66: 09d06f9 ci: run contrib/subtree tests in CI builds
  • 69: 0013a4d = 67: 735d902 CMake: show Win32 and Generator_platform build-option values
  • 65: b660ced = 68: a53ec05 hash-object: demonstrate a >4GB/LLP64 problem
  • 67: 693611b = 69: 2de956f write_object_file_literally(): use size_t
  • 72: 8140e2f = 70: 4f94774 object-file.c: use size_t for header lengths
  • 73: 1666a82 = 71: 960e613 hash algorithms: use size_t for section lengths
  • 74: 4092ea6 = 72: c2ac4da hash-object --stdin: verify that it works with >4GB/LLP64
  • 75: 1f6e3b7 = 73: f2d6929 hash-object: add another >4GB/LLP64 test case
  • 76: e392645 = 74: d4e75fe setup: properly use "%(prefix)/" when in WSL
  • 70: f51884b = 75: 9a3b5de init: do parse all core.* settings early
  • 71: 302c7b3 = 76: 8231190 Enable the built-in FSMonitor as an experimental feature
  • 77: 76d135a = 77: ea54e11 hash-object: add a >4GB/LLP64 test case using filtered input
  • 78: f41b31e = 78: 0d1afb3 compat/mingw.c: do not warn when failing to get owner
  • 79: 73fc5e2 = 79: 6a597dd mingw: $env:TERM="xterm-256color" for newer OSes
  • 81: 8a7cd9a = 80: 75ba11c vcxproj: allow building with NO_PERL again
  • 82: 9ab30d3 = 81: 041dd26 vcxproj: require C11
  • 83: b624dda = 82: 2ae297b vcxproj: ignore the -pedantic option
  • 84: 1ce8649 = 83: e8abe8c vcxproj: include reftable when committing .vcxproj files
  • 85: 2839179 = 84: e8b3a15 vcxproj: handle libreftable_test, too
  • 86: 8c6ea41 = 85: cacf406 vcxproj: avoid escaping double quotes in the defines
  • 87: f885717 = 86: 28770b0 ci: adjust Azure Pipeline for runs_on_pool
  • 89: e116d61 = 87: 639d82f ci: stop linking the prove cache
  • 91: 47a134a = 88: 3ba4ca5 ci: reinstate Azure Pipelines support
  • 92: 5165233 = 89: 37d0674 azure-pipeline: drop the GETTEXT_POISON job
  • 88: 6363d51 = 90: 71d2cd7 Add config option windows.appendAtomically
  • 93: 877bfff = 91: b17ffda azure-pipeline: stop hard-coding apt-get calls
  • 80: 1230fd6 = 92: 967fc79 winansi: check result and Buffer before using Name
  • 90: 2cc2d72 = 93: 84a99ff mingw: change core.fsyncObjectFiles = 1 by default
  • 94: 580663d = 94: 21b3505 azure-pipeline: drop the code to write to/read from a file share
  • 95: 4ac4f64 = 95: 5c3f962 azure-pipeline: use partial clone/parallel checkout to initialize minimal-sdk
  • 98: 06f9914 = 96: 9a5e14b bswap.h: add support for built-in bswap functions
  • 96: 863b73a = 97: 104877d azure-pipeline: downcase the job name of the Linux32 job
  • 103: fc660ac = 98: d6e5da1 config.mak.uname: add support for clangarm64
  • 97: df95944 = 99: 0ee2091 MinGW: link as terminal server aware
  • 99: 01df623 = 100: 61ad738 azure-pipeline: run static-analysis on jammy
  • 100: d10110e = 101: cfc4a15 Fix Windows version resources
  • 105: ce53132 = 102: d9916fb ci: create clangarm64-build.yml
  • 106: a6ddee2 = 103: ad9dd9a status: fix for old-style submodules with commondir
  • 107: db52827 = 104: c49fb9f windows: skip linking git-<command> for built-ins
  • 108: 2fc0827 = 105: 40b44e6 windows: fix Repository>Explore Working Copy
  • 101: 2b3a946 = 106: ce2c56e http: optionally load libcurl lazily
  • 102: 55ae6d2 = 107: 3320c2a http: support lazy-loading libcurl also on Windows
  • 104: b071953 = 108: 6da619b http: when loading libcurl lazily, allow for multiple SSL backends
  • 109: 0a71da0 = 109: 069dfe0 mingw: do load libcurl dynamically by default
  • 110: 064f3e2 = 110: 85cc10d Add a GitHub workflow to verify that Git/Scalar work in Nano Server
  • 111: 2425210 = 111: 29e96c7 mingw: suggest windows.appendAtomically in more cases
  • 112: 8e3b73d = 112: 948d5be Win32: make FILETIME conversion functions public
  • 113: df9a48b = 113: 6038c03 Win32: dirent.c: Move opendir down
  • 114: 2e52d5a = 114: 8872981 mingw: make the dirent implementation pluggable
  • 115: f5a5772 = 115: 81f30c8 Win32: make the lstat implementation pluggable
  • 116: 1b4c18f = 116: ba627c6 mingw: add infrastructure for read-only file system level caches
  • 117: 84f6d21 = 117: 7441457 mingw: add a cache below mingw's lstat and dirent implementations
  • 118: fbf5dcd = 118: 7a255d1 fscache: load directories only once
  • 119: ceac169 = 119: ebbfe19 fscache: add key for GIT_TRACE_FSCACHE
  • 120: 80f810c = 120: 4bb117f fscache: remember not-found directories
  • 121: bb4348f = 121: b995381 fscache: add a test for the dir-not-found optimization
  • 122: 0d95d56 = 122: 1fba90b add: use preload-index and fscache for performance
  • 123: 49432ea = 123: 92180f8 dir.c: make add_excludes aware of fscache during status
  • 124: 8b8bfa7 = 124: d72ca85 fscache: make fscache_enabled() public
  • 125: 173863f = 125: 692aacd dir.c: regression fix for add_excludes with fscache
  • 126: af5264a = 126: b4dcd99 fetch-pack.c: enable fscache for stats under .git/objects
  • 127: 6bac323 = 127: 667ff29 checkout.c: enable fscache for checkout again
  • 128: 68314d6 = 128: 02f37d0 Enable the filesystem cache (fscache) in refresh_index().
  • 129: 0b80a21 = 129: 3c09bb2 fscache: use FindFirstFileExW to avoid retrieving the short name
  • 130: abc8c67 = 130: c855801 status: disable and free fscache at the end of the status command
  • 131: bd2ce89 = 131: 54d3d7e fscache: add GIT_TEST_FSCACHE support
  • 132: bc6e81c = 132: e1d15df fscache: add fscache hit statistics
  • 133: 8c5843f = 133: 764e4f3 mem_pool: add GIT_TRACE_MEMPOOL support
  • 134: 5585b73 = 134: e209c76 fscache: fscache takes an initial size
  • 135: d9a302b = 135: 17cd9bb fscache: update fscache to be thread specific instead of global
  • 136: 21ae763 = 136: 22746c4 fscache: teach fscache to use mempool
  • 137: 05a24e2 = 137: 5f28638 fscache: make fscache_enable() thread safe
  • 143: 969acfe = 138: a8cc160 git-gui: provide question helper for retry fallback on Windows
  • 138: 33d214f = 139: c7aa1e1 fscache: teach fscache to use NtQueryDirectoryFile
  • 144: 03dbc1a = 140: c552636 git gui: set GIT_ASKPASS=git-gui--askpass if not set yet
  • 139: e1ad005 = 141: cd52454 unpack-trees: enable fscache for sparse-checkout
  • 146: 6a6030f = 142: 0e00315 git-gui--askyesno: fix funny text wrapping
  • 140: fd1ceb4 = 143: b88cd6c fscache: remember the reparse tag for each entry
  • 148: 1174c7f = 144: 603e1b6 git-gui--askyesno: allow overriding the window title
  • 141: e1d48e8 = 145: ab9cb06 fscache: implement an FSCache-aware is_mount_point()
  • 150: ded52e4 = 146: 3272a87 git-gui--askyesno (mingw): use Git for Windows' icon, if available
  • 142: a4c18d1 = 147: b6ae399 clean: make use of FSCache
  • 145: 4945bca = 148: 81d772a gitk: Unicode file name support
  • 147: a58886f = 149: 01d320c gitk: Use an external icon file on Windows
  • 149: 7996cfd = 150: 7538786 gitk: fix arrow keys in input fields with Tcl/Tk >= 8.6
  • 151: 13a38f4 = 151: 22f5372 gitk: make the "list references" default window width wider
  • 152: 3901a46 = 152: 0f59f8f pack-objects (mingw): demonstrate a segmentation fault with large deltas
  • 153: 0c00381 = 153: 51595c8 mingw: support long paths
  • 154: 2f76dca = 154: dda6a7f Win32: fix 'lstat("dir/")' with long paths
  • 155: d0f0550 = 155: 0d7694c win32(long path support): leave drive-less absolute paths intact
  • 156: 4351d48 = 156: 6929de4 mingw: Support git_terminal_prompt with more terminals
  • 159: 9c7f461 = 157: 8bdef24 compat/terminal.c: only use the Windows console if bash 'read -r' fails
  • 160: a580229 = 158: 0cafc23 mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
  • 161: 7253cb7 = 159: d0f54cd Unbreak interactive GPG prompt upon signing
  • 162: 5fdb961 = 160: fbbddd1 strbuf_readlink: don't call readlink twice if hint is the exact link size
  • 163: 197770e = 161: 3cc155b strbuf_readlink: support link targets that exceed PATH_MAX
  • 164: 6ec06e4 = 162: 2e6e2fe lockfile.c: use is_dir_sep() instead of hardcoded '/' checks
  • 157: 71ec4dc = 163: 5f33b10 compat/fsmonitor/fsm-*-win32: support long paths
  • 158: a53760c = 164: 35d21d9 clean: suggest using core.longPaths if paths are too long to remove
  • 165: 894800f = 165: 6dc7506 Win32: don't call GetFileAttributes twice in mingw_lstat()
  • 166: d4f848b = 166: 51eca88 Win32: implement stat() with symlink support
  • 167: a244631 = 167: f12e8e5 Win32: remove separate do_lstat() function
  • 168: e21a713 = 168: 35e7efe Win32: let mingw_lstat() error early upon problems with reparse points
  • 169: 045ec58 = 169: 0666e14 mingw: teach fscache and dirent about symlinks
  • 170: a32fdc5 = 170: 27a0d89 Win32: lstat(): return adequate stat.st_size for symlinks
  • 171: 7f5e9d4 = 171: 114bb1d Win32: factor out retry logic
  • 172: 80d7bba = 172: 7c70d3a Win32: change default of 'core.symlinks' to false
  • 173: 158b54a = 173: a2792ba Win32: add symlink-specific error codes
  • 174: 664a270 = 174: 2690c18 Win32: mingw_unlink: support symlinks to directories
  • 175: ecf93d1 = 175: 030f991 Win32: mingw_rename: support renaming symlinks
  • 176: f7295d8 = 176: 6410145 Win32: mingw_chdir: change to symlink-resolved directory
  • 177: 2494440 = 177: a340906 Win32: implement readlink()
  • 178: 617f336 = 178: 558f73e mingw: lstat: compute correct size for symlinks
  • 179: 0233cf4 = 179: a07e093 Win32: implement basic symlink() functionality (file symlinks only)
  • 180: 8b6a694 = 180: d0938d5 Win32: symlink: add support for symlinks to directories
  • 181: fc9874c = 181: 70fd176 mingw: try to create symlinks without elevated permissions
  • 182: 6ebd24a = 182: dc4f744 mingw: emulate stat() a little more faithfully
  • 183: 8e57fb1 = 183: d5060da mingw: special-case index entries for symlinks with buggy size
  • 185: 4fe390a = 184: d5ffb7f Win32: symlink: move phantom symlink creation to a separate function
  • 187: e18cd00 = 185: 732e863 Introduce helper to create symlinks that knows about index_state
  • 184: 37ec29e = 186: 21fea19 mingw: introduce code to detect whether we're inside a Windows container
  • 189: 28148ac = 187: cc600fa mingw: allow to specify the symlink type in .gitattributes
  • 186: d70b9a2 = 188: e899f4d mingw: when running in a Windows container, try to rename() harder
  • 191: 2a15759 = 189: 706a2bf Win32: symlink: add test for symlink attribute
  • 188: b7026b6 = 190: 29c444c mingw: move the file_attr_to_st_mode() function definition
  • 193: 3f0c323 = 191: bed13a7 mingw: explicitly specify with which cmd to prefix the cmdline
  • 190: d31b353 = 192: f927210 mingw: Windows Docker volumes are not symbolic links
  • 194: c944d83 = 193: 2eec72e mingw: when path_lookup() failed, try BusyBox
  • 192: 2fc74ad = 194: 00801b0 mingw: work around rename() failing on a read-only file
  • 195: 7a98ad0 = 195: b20b278 test-lib: avoid unnecessary Perl invocation
  • 196: 0d7eb77 = 196: daa8ca3 test-tool: learn to act as a drop-in replacement for iconv
  • 197: cd7dea0 = 197: bb2f2b2 tests(mingw): if iconv is unavailable, use test-helper --iconv
  • 198: da8ccac = 198: 64861d7 gitattributes: mark .png files as binary
  • 199: 0e97874 = 199: 4acdb1a tests: move test PNGs into t/lib-diff/
  • 200: d5c6256 = 200: 56bb764 tests: only override sort & find if there are usable ones in /usr/bin/
  • 201: f0d1b05 = 201: cb6e0f8 tests: use the correct path separator with BusyBox
  • 202: d644d3b = 202: 5b38421 mingw: only use Bash-ism builtin pwd -W when available
  • 203: 83f700b = 203: bf4571a tests (mingw): remove Bash-specific pwd option
  • 204: 76612c9 = 204: ba5b140 test-lib: add BUSYBOX prerequisite
  • 205: 3d74d36 = 205: 939ee14 t5003: use binary file from t/lib-diff/
  • 206: c8eee94 = 206: ed1915d t5532: workaround for BusyBox on Windows
  • 207: 877b921 = 207: 6f94ed5 t5605: special-case hardlink test for BusyBox-w32
  • 208: fe6fb10 = 208: 029b102 t5813: allow for $PWD to be a Windows path
  • 209: 556a0c6 = 209: 707e6ad t9200: skip tests when $PWD contains a colon
  • 210: e71de79 = 210: 62cb5ce mingw: add a Makefile target to copy test artifacts
  • 212: d04f236 = 211: 1118e57 mingw: kill child processes in a gentler way
  • 213: e3ef9c4 = 212: 71bc5b0 mingw: do not call xutftowcs_path in mingw_mktemp
  • 211: 5b7e8fb = 213: 8cd2d55 mingw: optionally enable wsl compability file mode bits
  • 214: 4a2d059 = 214: df46739 mingw: really handle SIGINT
  • 215: a855b6b = 215: 215f38a Partially un-revert "editor: save and reset terminal after calling EDITOR"
  • 216: beec2c2 = 216: e83bb43 reset: reinstate support for the deprecated --stdin option
  • 218: 055c78a = 217: 9e73bd9 Describe Git for Windows' architecture [no ci]
  • 219: 35ddc95 = 218: 6f46106 Modify the Code of Conduct for Git for Windows
  • 220: 984ad31 = 219: e3158c1 CONTRIBUTING.md: add guide for first-time contributors
  • 221: 03876e1 = 220: 3774cb8 README.md: Add a Windows-specific preamble
  • 222: 52de24b = 221: 464a1aa Add an issue template
  • 223: f0105d5 = 222: 80f9fff Modify the GitHub Pull Request template (to reflect Git for Windows)
  • 224: c965bd2 = 223: acef9a5 .github: Add configuration for the Sentiment Bot
  • 225: 2d06bac = 224: 639e115 Document how $HOME is set on Windows
  • 217: 0932c13 = 225: e20190a fsmonitor: reintroduce core.useBuiltinFSMonitor
  • 226: 5fa3d9c = 226: 15dca1b Add a GitHub workflow to monitor component updates
  • 227: 511855f = 227: 6298fe1 SECURITY.md: document Git for Windows' policies

"Boring" in the most pleasant way, that range-diff.

pascalmuller and others added 30 commits November 20, 2023 18:02
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>
On LLP64 systems, such as Windows, the size of `long`, `int`, etc. is
only 32 bits (for backward compatibility). Git's use of `unsigned long`
for file memory sizes in many places, rather than size_t, limits the
handling of large files on LLP64 systems (commonly given as `>4GB`).

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

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

Signed-off-by: Philip Oakley <philipoakley@iee.email>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The previous commit adds a test that demonstrates a problem in the
`hash-object --literally` command, manifesting in an unnecessary file
size limit on systems using the LLP64 data model (which includes
Windows).

Walking the affected code path is `cmd_hash_object()` >> `hash_fd()` >>
`hash_literally()` >> `hash_object_file_literally()`.

The function `hash_object_file_literally()` is the first with a file
length parameter (via a mem buffer). This commit changes the type of
that parameter to the LLP64 compatible `size_t` type.

There are no other uses of the function. The `strbuf` type is already
`size_t` compatible.

Note: The hash-object test does not yet pass. Subsequent commits will
continue to walk the call tree's lower level functions to identify
further fixes.

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

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

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

Signed-off-by: Philip Oakley <philipoakley@iee.email>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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>
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>
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 Git for Windows, `has_symlinks` is set to 0 by default. Therefore, we
need to parse the config setting `core.symlinks` to know if it has been
set to `true`. In `git init`, we must do that before copying the
templates because they might contain symbolic links.

Even if the support for symbolic links on Windows has not made it to
upstream Git yet, we really should make sure that all the `core.*`
settings are parsed before proceeding, as they might very well change
the behavior of `git init` in a way the user intended.

This fixes git-for-windows#3414

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
If `feature.experimental` and `feature.manyFiles` are set and the user
has not explicitly turned off the builtin FSMonitor, we now start
the built-in FSMonitor by default.

Only forcing it when UNSET matches the behavior of UPDATE_DEFAULT_BOOL()
used for other repo settings.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
To verify that the `clean` side of the `clean`/`smudge` filter code is
correct with regards to LLP64 (read: to ensure that `size_t` is used
instead of `unsigned long`), here is a test case using a trivial filter,
specifically _not_ writing anything to the object store to limit the
scope of the test case.

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

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

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

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

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

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

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

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

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

This is the same heuristic used by the Cygwin runtime.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This is another fall-out of the recent refactoring flurry.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes the build after 7bc341e (git-compat-util: add a test
balloon for C99 support, 2021-12-01).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This is now passed by default, ever since 6a8cbc4 (developer: enable
pedantic by default, 2021-09-03).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Since ef8a6c6 (reftable: utility functions, 2021-10-07) we not only
have a libreftable, but also a libreftable_test.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Visual Studio 2022 does not like that at all.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
These refactorings are really gifts that keep on giving.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
It is not useful because we do not have any persisted directory anymore,
not since dropping our Travis CI support.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
... so that we can test a MinGit backport in a private repository (with
GitHub Actions, minutes and parallel jobs are limited way more than with
Azure Pipelines in private repositories).

In this commit, we reinstate the exact version of `azure-pipelines.yml`
as 6081d38 (ci: retire the Azure Pipelines definition, 2020-04-11)
deleted.

Naturally, many adjustments are required to make it work again. Some of
the changes are actually outside of that file (such as the
`runs_on_pool` changes that are needed in the Azure Pipelines part of
`ci/lib.sh`) and they were made in the commits leading up to this here
commit.

However, other adjustments are required in the `azure-pipelines.yml`
file itself, and for ease of review (read: to build confidence in those
changes) they will be made in subsequent, individual commits that
explain the intent, context, implementation and justification like every
good commit message should do.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This is a follow-up to 6c280b4 (ci: remove GETTEXT_POISON jobs,
2021-01-20) after reinstating the Azure Pipeline.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
We have `ci/install-dependencies.sh` for that. Incidentally, this avoids
the following error in the linux-* jobs:

    The following packages have unmet dependencies:
    git-email : Depends: git (< 1:2.25.1-.) but 1:2.35.1-0ppa1~ubuntu20.04.1 is to be installed
	  Recommends: libemail-valid-perl but it is not going to be installed

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
NtQueryObject under Wine can return a success but fill out no name.
In those situations, Wine will set Buffer to NULL, and set result to
the sizeof(OBJECT_NAME_INFORMATION).

Running a command such as

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

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

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

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

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

Co-Authored-By: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: 孙卓识 <sunzhuoshi@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
From the documentation of said setting:

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

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

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

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
We haven't used this feature in ages, we don't actually need to.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
vdye and others added 21 commits November 20, 2023 18:02
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>
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>
These are Git for Windows' Git GUI and gitk patches. We will have to
decide at some point what to do about them, but that's a little lower
priority (as Git GUI seems to be unmaintained for the time being, and
the gitk maintainer keeps a very low profile on the Git mailing list,
too).

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

clean: suggest using `core.longPaths` if paths are too long to remove
This is the recommended way on GitHub to describe policies revolving around
security issues and about supported versions.

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>
…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>
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>
Handle Ctrl+C in Git Bash nicely

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>
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>
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>
…updates

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho self-assigned this Nov 20, 2023
@dscho
Copy link
Member Author

dscho commented Nov 20, 2023

Hrm. I was under the impression that 99fe06c would hold the workflow run. But that only tests for the same commit, not for tree-same commits. So I canceled the run for now, no need to waste electrons. I'll re-run it once https://github.com/git-for-windows/git/actions/runs/6933380985 is done (which tests the tree-same shears/main).

@dscho dscho added this to the Next release milestone Nov 20, 2023
@dscho dscho linked an issue Nov 20, 2023 that may be closed by this pull request
@dscho
Copy link
Member Author

dscho commented Nov 20, 2023

/git-artifacts

The tag-git workflow run was started

The git-artifacts-x86_64 workflow run was started.
The git-artifacts-i686 workflow run was started.

@dscho
Copy link
Member Author

dscho commented Nov 20, 2023

/release

The release-git workflow run was started

@dscho dscho merged commit 4b968f3 into git-for-windows:main Nov 20, 2023
@dscho dscho deleted the rebase-to-v2.43.0 branch November 20, 2023 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[New git version] v2.43.0