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-rc2 #4692

Merged
merged 319 commits into from
Nov 14, 2023
Merged

Rebase to v2.43.0-rc2 #4692

merged 319 commits into from
Nov 14, 2023

Conversation

dscho
Copy link
Member

@dscho dscho commented Nov 14, 2023

Range-diff relative to main
  • 1: 4d7a679 = 1: 99ee771 gitk(Windows): avoid inadvertently calling executables in the worktree
  • 2: c86da0d = 2: ce8f9dc t9350: point out that refs are not updated correctly
  • 3: f5eb8d4 = 3: cae5327 transport-helper: add trailing --
  • 4: 658b9c1 = 4: c7d6c08 remote-helper: check helper status after import/export
  • 5: 2e45955 = 5: d6eee39 mingw: demonstrate a problem with certain absolute paths
  • 6: 0ba67db = 6: 839f23d clean: do not traverse mount points
  • 8: e832169 = 7: 807aeb0 Always auto-gc after calling a fast-import transport
  • 9: 40dcfb6 = 8: 3c210cb mingw: allow absolute paths without drive prefix
  • 7: 7df581d = 9: 838f42d mingw: include the Python parts in the build
  • 11: e4f9da9 = 10: 10fc29b win32/pthread: avoid name clashes with winpthread
  • 12: 76532f9 = 11: e80f6ff git-compat-util: avoid redeclaring _DEFAULT_SOURCE
  • 13: c4e9c67 = 12: 4c10881 Import the source code of mimalloc v2.0.9
  • 14: 28f85b6 = 13: f246ffc mimalloc: adjust for building inside Git
  • 10: 5c302cd = 14: fd87353 clean: remove mount points when possible
  • 15: 19d1ac1 = 15: 9958b62 mimalloc: offer a build-time option to enable it
  • 16: 8f7379f = 16: 33e787f mimalloc: use "weak" random seed when statically linked
  • 17: 5bd76ee = 17: 34e57b8 mingw: use mimalloc
  • 20: 737a83a = 18: bb20728 transport: optionally disable side-band-64k
  • 21: 124c80a = 19: 0dba623 mingw: make sure errno is set correctly when socket operations fail
  • 22: 32d0363 = 20: 6716c08 mingw: do resolve symlinks in getcwd()
  • 23: 4c02cb8 = 21: dfba700 mingw: fix fatal error working on mapped network drives on Windows
  • 26: 777f6c1 = 22: 92a1845 mingw: ensure valid CTYPE
  • 18: 81587fb = 23: 21af934 mingw: demonstrate a git add issue with NTFS junctions
  • 28: e374107 = 24: ace6eb2 mingw: allow git.exe to be used instead of the "Git wrapper"
  • 19: c2b0c5e = 25: a3c1c8a strbuf_realpath(): use platform-dependent API if available
  • 30: 858fc76 = 26: 91a2228 mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory
  • 24: 72ff319 = 27: f2df755 clink.pl: fix MSVC compile script to handle libcurl-d.lib
  • 32: da1a522 = 28: f69939b mingw: implement a platform-specific strbuf_realpath()
  • 25: d0491e8 = 29: 363307d vcxproj: unclash project directories with build outputs
  • 27: 776d22a = 30: b1ec581 t5505/t5516: allow running without .git/branches/ in the templates
  • 29: 137af27 = 31: af42f05 t5505/t5516: fix white-space around redirectors
  • 31: c694cb2 = 32: 10d7917 http: use new "best effort" strategy for Secure Channel revoke checking
  • 33: 9488d9f = 33: 55f56cf t3701: verify that we can add lots of files interactively
  • 34: fa8056d = 34: a373fdd git add -i: handle CR/LF line endings in the interactive input
  • 35: 154af7c = 35: cd1bcca commit: accept "scissors" with CR/LF line endings
  • 36: 6edee7b = 36: 7891bf2 t0014: fix indentation
  • 38: 52e3679 = 37: 83c8531 clink.pl: fix libexpatd.lib link error when using MSVC
  • 39: 500d4d6 = 38: b86c726 Makefile: clean up .ilk files when MSVC=1
  • 40: 76ad1ae = 39: 767aa56 vcbuild: add support for compiling Windows resource files
  • 41: d39b091 = 40: 79896dc config.mak.uname: add git.rc to MSVC builds
  • 42: e0b859b = 41: 7cceeac clink.pl: ignore no-stack-protector arg on MSVC=1 builds
  • 43: a56ea2d = 42: dc06abb clink.pl: move default linker options for MSVC=1 builds
  • 44: d2429c4 = 43: 1ff138c buildsystems: remove duplicate clause
  • 45: e66e709 = 44: f1fa4a8 vcxproj: handle resource files, too
  • 46: c921ac0 = 45: 6a3c6c2 vcxproj: ignore -fno-stack-protector and -fno-common
  • 37: 2a43305 = 46: 6d79c57 git-gui: accommodate for intent-to-add files
  • 48: 1861f17 = 47: d922675 vcpkg_install: detect lack of Git
  • 49: d9723be = 48: e8fb9fb vcpkg_install: add comment regarding slow network connections
  • 50: f273cab = 49: 2e2b096 vcxproj: support building Windows/ARM64 binaries
  • 51: 1ed6bfc = 50: ad247ec vcbuild: install ARM64 dependencies when building ARM64 binaries
  • 52: 4fd7ac2 = 51: 612dc26 vcbuild: add an option to install individual 'features'
  • 53: d016c1a = 52: 444757f cmake: allow building for Windows/ARM64
  • 54: ed279ff = 53: 33385e7 ci(vs-build) also build Windows/ARM64 artifacts
  • 47: 9e4e300 = 54: c19c356 vcxproj: handle GUI programs, too
  • 55: a284f63 = 55: 99958df Add schannel to curl installation
  • 56: d694ea0 = 56: d5ea7c1 cmake: install headless-git.
  • 57: 8324c00 = 57: f9645ad cmake(): allow setting HOST_CPU for cross-compilation
  • 64: 6a3596a = 58: 8acb548 subtree: update contrib/subtree test target
  • 58: d4763aa = 59: 48e4eba ci(vs-build): download the vcpkg artifacts using a dedicated Action
  • 59: c89e85f = 60: b86aa99 mingw: allow for longer paths in parse_interpreter()
  • 60: 520de08 = 61: 29c0d0f compat/vcbuild: document preferred way to build in Visual Studio
  • 61: 6dd9264 = 62: 6c67799 http: optionally send SSL client certificate
  • 62: 93fac97 = 63: 0aa30b9 CMake: default Visual Studio generator has changed
  • 63: 27dac6b = 64: aaacf2a .gitignore: add Visual Studio CMakeSetting.json file
  • 68: c0e192a = 65: b660ced hash-object: demonstrate a >4GB/LLP64 problem
  • 65: 5288f78 = 66: 0345392 CMakeLists: add default "x64-windows" arch for Visual Studio
  • 69: c8550d1 = 67: 693611b write_object_file_literally(): use size_t
  • 66: 38ab6cf = 68: 033f003 ci: run contrib/subtree tests in CI builds
  • 67: dcca800 = 69: 0013a4d CMake: show Win32 and Generator_platform build-option values
  • 74: 5129971 = 70: f51884b init: do parse all core.* settings early
  • 75: a4acf0d = 71: 302c7b3 Enable the built-in FSMonitor as an experimental feature
  • 70: ebb599d = 72: 8140e2f object-file.c: use size_t for header lengths
  • 71: 1858c19 = 73: 1666a82 hash algorithms: use size_t for section lengths
  • 72: cd85f3c = 74: 4092ea6 hash-object --stdin: verify that it works with >4GB/LLP64
  • 73: 03a36e3 = 75: 1f6e3b7 hash-object: add another >4GB/LLP64 test case
  • 76: 1d03be8 = 76: e392645 setup: properly use "%(prefix)/" when in WSL
  • 78: b8c80b5 = 77: 76d135a hash-object: add a >4GB/LLP64 test case using filtered input
  • 79: c8bc8d4 = 78: f41b31e compat/mingw.c: do not warn when failing to get owner
  • 80: cf8a25a = 79: 73fc5e2 mingw: $env:TERM="xterm-256color" for newer OSes
  • 81: 12b1765 = 80: 1230fd6 winansi: check result and Buffer before using Name
  • 82: ab38805 = 81: 8a7cd9a vcxproj: allow building with NO_PERL again
  • 83: bad0b06 = 82: 9ab30d3 vcxproj: require C11
  • 84: 3033d64 = 83: b624dda vcxproj: ignore the -pedantic option
  • 85: 6d4e664 = 84: 1ce8649 vcxproj: include reftable when committing .vcxproj files
  • 86: 3174c8e = 85: 2839179 vcxproj: handle libreftable_test, too
  • 87: 7ed48cf = 86: 8c6ea41 vcxproj: avoid escaping double quotes in the defines
  • 88: b439a5a = 87: f885717 ci: adjust Azure Pipeline for runs_on_pool
  • 77: 3b38605 = 88: 6363d51 Add config option windows.appendAtomically
  • 89: ca3825b = 89: e116d61 ci: stop linking the prove cache
  • 91: e0ba1af = 90: 2cc2d72 mingw: change core.fsyncObjectFiles = 1 by default
  • 90: 1d1c0f2 = 91: 47a134a ci: reinstate Azure Pipelines support
  • 92: 10f299f = 92: 5165233 azure-pipeline: drop the GETTEXT_POISON job
  • 93: b194fb1 = 93: 877bfff azure-pipeline: stop hard-coding apt-get calls
  • 94: 5a9303b = 94: 580663d azure-pipeline: drop the code to write to/read from a file share
  • 95: e700b5a = 95: 4ac4f64 azure-pipeline: use partial clone/parallel checkout to initialize minimal-sdk
  • 96: b852b0c = 96: 863b73a azure-pipeline: downcase the job name of the Linux32 job
  • 98: a8f0418 = 97: df95944 MinGW: link as terminal server aware
  • 97: 32a0f75 = 98: 06f9914 bswap.h: add support for built-in bswap functions
  • 99: 1f71b8c = 99: 01df623 azure-pipeline: run static-analysis on jammy
  • 100: 6b40de2 = 100: d10110e Fix Windows version resources
  • 102: 9d55dc7 = 101: 2b3a946 http: optionally load libcurl lazily
  • 107: a54bee9 = 102: 55ae6d2 http: support lazy-loading libcurl also on Windows
  • 101: 049e608 = 103: fc660ac config.mak.uname: add support for clangarm64
  • 108: 6743bbe = 104: b071953 http: when loading libcurl lazily, allow for multiple SSL backends
  • 103: a32c906 = 105: ce53132 ci: create clangarm64-build.yml
  • 104: b90bfb5 = 106: a6ddee2 status: fix for old-style submodules with commondir
  • 105: 1b89306 = 107: db52827 windows: skip linking git-<command> for built-ins
  • 106: 971bd28 = 108: 2fc0827 windows: fix Repository>Explore Working Copy
  • 109: 613b92c = 109: 0a71da0 mingw: do load libcurl dynamically by default
  • 110: 39f33ef = 110: 064f3e2 Add a GitHub workflow to verify that Git/Scalar work in Nano Server
  • 111: 81bba42 = 111: 2425210 mingw: suggest windows.appendAtomically in more cases
  • 112: 602784b = 112: 8e3b73d Win32: make FILETIME conversion functions public
  • 113: dfbf435 = 113: df9a48b Win32: dirent.c: Move opendir down
  • 114: 3f7d026 = 114: 2e52d5a mingw: make the dirent implementation pluggable
  • 115: 83a756d = 115: f5a5772 Win32: make the lstat implementation pluggable
  • 116: 0926dd2 = 116: 1b4c18f mingw: add infrastructure for read-only file system level caches
  • 117: 3edcc1f = 117: 84f6d21 mingw: add a cache below mingw's lstat and dirent implementations
  • 118: 32094b6 = 118: fbf5dcd fscache: load directories only once
  • 119: b46869b = 119: ceac169 fscache: add key for GIT_TRACE_FSCACHE
  • 120: b36924b = 120: 80f810c fscache: remember not-found directories
  • 121: 973763b = 121: bb4348f fscache: add a test for the dir-not-found optimization
  • 122: 1312eda = 122: 0d95d56 add: use preload-index and fscache for performance
  • 123: 53089f8 = 123: 49432ea dir.c: make add_excludes aware of fscache during status
  • 124: 9867fbe = 124: 8b8bfa7 fscache: make fscache_enabled() public
  • 125: 8b3acc2 = 125: 173863f dir.c: regression fix for add_excludes with fscache
  • 126: 3fc7c37 = 126: af5264a fetch-pack.c: enable fscache for stats under .git/objects
  • 127: 544a782 = 127: 6bac323 checkout.c: enable fscache for checkout again
  • 128: 9ea1e93 = 128: 68314d6 Enable the filesystem cache (fscache) in refresh_index().
  • 129: 96adbd5 = 129: 0b80a21 fscache: use FindFirstFileExW to avoid retrieving the short name
  • 130: 5d9f29d = 130: abc8c67 status: disable and free fscache at the end of the status command
  • 131: aa3b5ca = 131: bd2ce89 fscache: add GIT_TEST_FSCACHE support
  • 132: 47d52cd = 132: bc6e81c fscache: add fscache hit statistics
  • 133: 4aefeb7 = 133: 8c5843f mem_pool: add GIT_TRACE_MEMPOOL support
  • 134: cec1d9f = 134: 5585b73 fscache: fscache takes an initial size
  • 135: 5689c8a = 135: d9a302b fscache: update fscache to be thread specific instead of global
  • 136: 20fae40 = 136: 21ae763 fscache: teach fscache to use mempool
  • 137: b990cda = 137: 05a24e2 fscache: make fscache_enable() thread safe
  • 138: c9b86d7 = 138: 33d214f fscache: teach fscache to use NtQueryDirectoryFile
  • 139: 27ecb76 = 139: e1ad005 unpack-trees: enable fscache for sparse-checkout
  • 140: 816b92a = 140: fd1ceb4 fscache: remember the reparse tag for each entry
  • 141: c0318bd = 141: e1d48e8 fscache: implement an FSCache-aware is_mount_point()
  • 142: cff07a2 = 142: a4c18d1 clean: make use of FSCache
  • 143: 511c9ca = 143: 969acfe git-gui: provide question helper for retry fallback on Windows
  • 144: 86fa7f5 = 144: 03dbc1a git gui: set GIT_ASKPASS=git-gui--askpass if not set yet
  • 145: 5274e1e = 145: 4945bca gitk: Unicode file name support
  • 146: 75aa245 = 146: 6a6030f git-gui--askyesno: fix funny text wrapping
  • 147: f445f85 = 147: a58886f gitk: Use an external icon file on Windows
  • 148: 378f09a = 148: 1174c7f git-gui--askyesno: allow overriding the window title
  • 149: b9b7d2b = 149: 7996cfd gitk: fix arrow keys in input fields with Tcl/Tk >= 8.6
  • 150: 06a8406 = 150: ded52e4 git-gui--askyesno (mingw): use Git for Windows' icon, if available
  • 151: 440f9a1 = 151: 13a38f4 gitk: make the "list references" default window width wider
  • 152: 3080d0e = 152: 3901a46 pack-objects (mingw): demonstrate a segmentation fault with large deltas
  • 153: 7d050c4 = 153: 0c00381 mingw: support long paths
  • 154: b3b5c57 = 154: 2f76dca Win32: fix 'lstat("dir/")' with long paths
  • 155: 223e4e3 = 155: d0f0550 win32(long path support): leave drive-less absolute paths intact
  • 156: 9af8453 = 156: 4351d48 mingw: Support git_terminal_prompt with more terminals
  • 158: 2240ba7 = 157: 71ec4dc compat/fsmonitor/fsm-*-win32: support long paths
  • 159: fa6363c = 158: a53760c clean: suggest using core.longPaths if paths are too long to remove
  • 157: cc5eb56 = 159: 9c7f461 compat/terminal.c: only use the Windows console if bash 'read -r' fails
  • 160: 7fa1987 = 160: a580229 mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
  • 161: 815930d = 161: 7253cb7 Unbreak interactive GPG prompt upon signing
  • 162: d47cfeb = 162: 5fdb961 strbuf_readlink: don't call readlink twice if hint is the exact link size
  • 163: c7b8fcc = 163: 197770e strbuf_readlink: support link targets that exceed PATH_MAX
  • 164: b13dfaf = 164: 6ec06e4 lockfile.c: use is_dir_sep() instead of hardcoded '/' checks
  • 165: 45a61bf = 165: 894800f Win32: don't call GetFileAttributes twice in mingw_lstat()
  • 166: 88fe264 = 166: d4f848b Win32: implement stat() with symlink support
  • 167: 16aa478 = 167: a244631 Win32: remove separate do_lstat() function
  • 168: a721f2f = 168: e21a713 Win32: let mingw_lstat() error early upon problems with reparse points
  • 169: 11e2368 = 169: 045ec58 mingw: teach fscache and dirent about symlinks
  • 170: e6177e5 = 170: a32fdc5 Win32: lstat(): return adequate stat.st_size for symlinks
  • 171: 0b47724 = 171: 7f5e9d4 Win32: factor out retry logic
  • 172: 9f6aa55 = 172: 80d7bba Win32: change default of 'core.symlinks' to false
  • 173: 16752ed = 173: 158b54a Win32: add symlink-specific error codes
  • 174: b12fbfd = 174: 664a270 Win32: mingw_unlink: support symlinks to directories
  • 175: 088b573 = 175: ecf93d1 Win32: mingw_rename: support renaming symlinks
  • 176: 8076e6d = 176: f7295d8 Win32: mingw_chdir: change to symlink-resolved directory
  • 177: 1f525b3 = 177: 2494440 Win32: implement readlink()
  • 178: d6dd947 = 178: 617f336 mingw: lstat: compute correct size for symlinks
  • 179: 04efcaf = 179: 0233cf4 Win32: implement basic symlink() functionality (file symlinks only)
  • 180: 970fcbb = 180: 8b6a694 Win32: symlink: add support for symlinks to directories
  • 181: 7cc62e8 = 181: fc9874c mingw: try to create symlinks without elevated permissions
  • 182: 349f79e = 182: 6ebd24a mingw: emulate stat() a little more faithfully
  • 183: 23c984f = 183: 8e57fb1 mingw: special-case index entries for symlinks with buggy size
  • 184: 3a7b0c7 = 184: 37ec29e mingw: introduce code to detect whether we're inside a Windows container
  • 186: 958ee6e = 185: 4fe390a Win32: symlink: move phantom symlink creation to a separate function
  • 185: b168ff8 = 186: d70b9a2 mingw: when running in a Windows container, try to rename() harder
  • 188: c774991 = 187: e18cd00 Introduce helper to create symlinks that knows about index_state
  • 187: 5e73e96 = 188: b7026b6 mingw: move the file_attr_to_st_mode() function definition
  • 190: 14abaa6 = 189: 28148ac mingw: allow to specify the symlink type in .gitattributes
  • 189: 9019a1f = 190: d31b353 mingw: Windows Docker volumes are not symbolic links
  • 192: 4434409 = 191: 2a15759 Win32: symlink: add test for symlink attribute
  • 191: c2563f3 = 192: 2fc74ad mingw: work around rename() failing on a read-only file
  • 193: 6d890cb = 193: 3f0c323 mingw: explicitly specify with which cmd to prefix the cmdline
  • 194: e6eb4c5 = 194: c944d83 mingw: when path_lookup() failed, try BusyBox
  • 195: b43c975 = 195: 7a98ad0 test-lib: avoid unnecessary Perl invocation
  • 196: 070c90e = 196: 0d7eb77 test-tool: learn to act as a drop-in replacement for iconv
  • 197: ede6b78 = 197: cd7dea0 tests(mingw): if iconv is unavailable, use test-helper --iconv
  • 198: 1337e64 = 198: da8ccac gitattributes: mark .png files as binary
  • 215: d4972a2 = 199: 0e97874 tests: move test PNGs into t/lib-diff/
  • 216: 85de4c8 = 200: d5c6256 tests: only override sort & find if there are usable ones in /usr/bin/
  • 217: 479fb19 = 201: f0d1b05 tests: use the correct path separator with BusyBox
  • 218: fa5a585 = 202: d644d3b mingw: only use Bash-ism builtin pwd -W when available
  • 219: 3b040ca = 203: 83f700b tests (mingw): remove Bash-specific pwd option
  • 220: e13ce0b = 204: 76612c9 test-lib: add BUSYBOX prerequisite
  • 221: 9f62196 = 205: 3d74d36 t5003: use binary file from t/lib-diff/
  • 222: 059cf2f = 206: c8eee94 t5532: workaround for BusyBox on Windows
  • 223: 6d6b575 = 207: 877b921 t5605: special-case hardlink test for BusyBox-w32
  • 224: 0a2b88b = 208: fe6fb10 t5813: allow for $PWD to be a Windows path
  • 225: 43f79ab = 209: 556a0c6 t9200: skip tests when $PWD contains a colon
  • 226: 3511db2 = 210: e71de79 mingw: add a Makefile target to copy test artifacts
  • 227: 9e340fa = 211: 5b7e8fb mingw: optionally enable wsl compability file mode bits
  • 199: ae6551a = 212: d04f236 mingw: kill child processes in a gentler way
  • 200: f0b1bce = 213: e3ef9c4 mingw: do not call xutftowcs_path in mingw_mktemp
  • 201: dd4ff04 = 214: 4a2d059 mingw: really handle SIGINT
  • 202: 52ba3ee = 215: a855b6b Partially un-revert "editor: save and reset terminal after calling EDITOR"
  • 208: 4de7667 = 216: beec2c2 reset: reinstate support for the deprecated --stdin option
  • 209: bdbec92 = 217: 0932c13 fsmonitor: reintroduce core.useBuiltinFSMonitor
  • 203: bfbaffe = 218: 055c78a Describe Git for Windows' architecture [no ci]
  • 204: caf0b16 = 219: 35ddc95 Modify the Code of Conduct for Git for Windows
  • 205: 18a28b0 = 220: 984ad31 CONTRIBUTING.md: add guide for first-time contributors
  • 206: 0a9e014 = 221: 03876e1 README.md: Add a Windows-specific preamble
  • 207: 973fd00 = 222: 52de24b Add an issue template
  • 211: c53d827 = 223: f0105d5 Modify the GitHub Pull Request template (to reflect Git for Windows)
  • 212: aa702fe = 224: c965bd2 .github: Add configuration for the Sentiment Bot
  • 213: 278a566 = 225: 2d06bac Document how $HOME is set on Windows
  • 210: 1612d84 = 226: 5fa3d9c Add a GitHub workflow to monitor component updates
  • 214: c9e7611 = 227: 511855f SECURITY.md: document Git for Windows' policies

As uneventful as I like my -rc2s.

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

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

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

Signed-off-by: Philip Oakley <philipoakley@iee.email>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In 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>
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>
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>
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>
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>
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>
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>
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>
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>
... 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>
We haven't used this feature in ages, we don't actually need to.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho and others added 13 commits November 14, 2023 20:09
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 14, 2023
@dscho dscho linked an issue Nov 14, 2023 that may be closed by this pull request
@dscho
Copy link
Member Author

dscho commented Nov 14, 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 14, 2023

/release

The release-git workflow run was started

@dscho dscho added this to the Next release milestone Nov 14, 2023
@dscho dscho merged commit 8d46532 into git-for-windows:main Nov 14, 2023
33 checks passed
@dscho dscho deleted the rebase-to-v2.43.0-rc2 branch November 14, 2023 22:15
@rimrul
Copy link
Member

rimrul commented Nov 19, 2023

I've noticed a tiny issue with our 2.43.0-rc versions:

I may have bumped a certain pkgrel in
git-for-windows/MINGW-packages@0c91cf2

And that pkgrel seems to not be resetting

git-for-windows/git-sdk-64@5df5f25

@dscho
Copy link
Member Author

dscho commented Nov 20, 2023

Good catch!

I think this is where we build the package, which calls into the build_mingw_w64_git sub-command of please.sh, which updates pkgver only for pre-releases (which I call "snapshots" nowadays), and otherwise only updates tag, which is then picked up by the pkgver function in PKGBUILD to update the pkgver variable.

Nowhere is pkgrel reset to 1.

Probably the best place to do that would be something similar to the --skip-doc-html option:

        --reset-pkgrel)
                sed_makepkg_e="$sed_makepkg_e"' -e s/^pkgrel=[0-9][0-9]*$/pkgrel=1/'
                ;;

and then use that in git-artifacts.yml.

dscho added a commit to dscho/git-for-windows-automation that referenced this pull request Nov 20, 2023
In case some update was necessary between releases, we need to increment
the `pkgrel` so that we can deploy new `mingw-w64-git` package versions.

However, the next release should reset that `pkgrel` back to 1.

Noticed by Matthias Aßhauer in
git-for-windows/git#4692 (comment).

The script that is used to build `mingw-w64-git` has been adjusted
accordingly in git-for-windows/build-extra#534
and with this change, we use the new `--reset-pkgrel` option.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho
Copy link
Member Author

dscho commented Nov 20, 2023

@rimrul here is my proposed solution: git-for-windows/build-extra#534 (needs to be merged first), and git-for-windows/git-for-windows-automation#58 (needs to be merged afterwards).

For the record, I'd like to merge these before Git for Windows v2.43.0 is due, probably later today, contingent on the time Git's v2.43.0 tag is published.

@dscho
Copy link
Member Author

dscho commented Nov 20, 2023

@rimrul looks as of the pkgrel=1 resetting has worked. Thank you so much for noticing and notifying!

@enderwert

This comment was marked as duplicate.

ammyk9 pushed a commit to ammyk9/git-for-windows-automation that referenced this pull request Aug 8, 2024
In case some update was necessary between releases, we need to increment
the `pkgrel` so that we can deploy new `mingw-w64-git` package versions.

However, the next release should reset that `pkgrel` back to 1.

Noticed by Matthias Aßhauer in
git-for-windows/git#4692 (comment).

The script that is used to build `mingw-w64-git` has been adjusted
accordingly in git-for-windows/build-extra#534
and with this change, we use the new `--reset-pkgrel` option.

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.

[New git version] v2.43.0-rc2