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.46.1 #5151

Merged
merged 435 commits into from
Sep 18, 2024
Merged

Conversation

dscho
Copy link
Member

@dscho dscho commented Sep 18, 2024

Range-diff relative to `main`
  • 1: 0ce4ebc = 1: c3458b0 gitk(Windows): avoid inadvertently calling executables in the worktree

  • 2: 6fc052f = 2: 86802eb t9350: point out that refs are not updated correctly

  • 3: 8e9deb4 = 3: f9372db transport-helper: add trailing --

  • 4: b0a2552 = 4: 9a0537d remote-helper: check helper status after import/export

  • 7: 45fcbb3 = 5: c875431 Always auto-gc after calling a fast-import transport

  • 10: 8eb57b9 = 6: 7299e07 mingw: include the Python parts in the build

  • 5: ff58b02 = 7: a165dca mingw: demonstrate a problem with certain absolute paths

  • 6: b21f4f8 = 8: bf29ea6 clean: do not traverse mount points

  • 11: 2cd47c2 = 9: 1f45254 win32/pthread: avoid name clashes with winpthread

  • 8: a528c9e = 10: 68477eb mingw: allow absolute paths without drive prefix

  • 9: afc345e = 11: 6498bc6 clean: remove mount points when possible

  • 12: 9621609 = 12: 199592b git-compat-util: avoid redeclaring _DEFAULT_SOURCE

  • 13: 95eb140 = 13: e7da041 Import the source code of mimalloc v2.1.2

  • 14: 92dd165 = 14: 7940371 mimalloc: adjust for building inside Git

  • 15: 5fea774 = 15: eb0f080 mimalloc: offer a build-time option to enable it

  • 16: 3ed2c63 = 16: 8be8dec mimalloc: use "weak" random seed when statically linked

  • 17: 59715f7 = 17: 6ea34cc mingw: use mimalloc

  • 21: 5288e4e = 18: ffcf774 transport: optionally disable side-band-64k

  • 22: 7aa2b90 = 19: f5100a6 mingw: make sure errno is set correctly when socket operations fail

  • 23: 9da30eb = 20: 007ede4 mingw: do resolve symlinks in getcwd()

  • 24: 82a24c6 = 21: c300d5e mingw: fix fatal error working on mapped network drives on Windows

  • 20: 589d510 = 22: a688f81 mingw: ensure valid CTYPE

  • 18: 4d068a6 = 23: 0dcd919 mingw: demonstrate a git add issue with NTFS junctions

  • 29: 2f25971 = 24: 2b23718 mingw: allow git.exe to be used instead of the "Git wrapper"

  • 19: e36a570 = 25: 5f51144 strbuf_realpath(): use platform-dependent API if available

  • 31: 1862a70 = 26: f2131b2 mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory

  • 25: c259fda = 27: 0898dca clink.pl: fix MSVC compile script to handle libcurl-d.lib

  • 26: dd68483 = 28: 1afb7a6 mingw: implement a platform-specific strbuf_realpath()

  • 27: 8235f11 = 29: 4ee453c vcxproj: unclash project directories with build outputs

  • 28: d3a3c97 = 30: 234e711 t5505/t5516: allow running without .git/branches/ in the templates

  • 30: 363e2da = 31: df9e510 t5505/t5516: fix white-space around redirectors

  • 32: fd5897c = 32: e712200 http: use new "best effort" strategy for Secure Channel revoke checking

  • 33: 868d06a = 33: 8972cd7 t3701: verify that we can add lots of files interactively

  • 34: e686992 = 34: 90d2072 git add -i: handle CR/LF line endings in the interactive input

  • 35: dba591a = 35: 2dbe355 commit: accept "scissors" with CR/LF line endings

  • 42: 909a7a3 = 36: d42d78a t0014: fix indentation

  • 43: 32ca720 = 37: 7b2e2b9 git-gui: accommodate for intent-to-add files

  • 36: 3bfb5f3 = 38: c2deb3c clink.pl: fix libexpatd.lib link error when using MSVC

  • 37: 2e6d10c = 39: af45d36 Makefile: clean up .ilk files when MSVC=1

  • 38: 78ca5c6 = 40: 96c1f69 vcbuild: add support for compiling Windows resource files

  • 39: fab0bbf = 41: d62f09e config.mak.uname: add git.rc to MSVC builds

  • 40: 718e568 = 42: 236daaa clink.pl: ignore no-stack-protector arg on MSVC=1 builds

  • 41: 05c712c = 43: 5723dd0 clink.pl: move default linker options for MSVC=1 builds

  • 45: 0949660 = 44: 1941190 buildsystems: remove duplicate clause

  • 47: 9355228 = 45: 68dab01 vcxproj: handle resource files, too

  • 49: b96fc1a = 46: 7c3c91c vcxproj: ignore -fno-stack-protector and -fno-common

  • 51: b5549e6 = 47: 5c194da vcxproj: handle GUI programs, too

  • 44: 08e26b2 = 48: bfde5e9 vcpkg_install: detect lack of Git

  • 46: 174dde4 = 49: 7175027 vcpkg_install: add comment regarding slow network connections

  • 48: d54356e = 50: f537112 vcxproj: support building Windows/ARM64 binaries

  • 50: e16fa38 = 51: 4c775c0 vcbuild: install ARM64 dependencies when building ARM64 binaries

  • 52: 3fcdb94 = 52: 8456f8c vcbuild: add an option to install individual 'features'

  • 54: af09b92 = 53: fb77fca cmake: allow building for Windows/ARM64

  • 55: 8b099ba ! 54: ce1f802 ci(vs-build) also build Windows/ARM64 artifacts

    @@ .github/workflows/main.yml: jobs:
          steps:
          - uses: actions/checkout@v4
     @@ .github/workflows/main.yml: jobs:
    -       uses: microsoft/setup-msbuild@v1
    +       uses: microsoft/setup-msbuild@v2
          - name: copy dlls to root
            shell: cmd
     -      run: compat\vcbuild\vcpkg_copy_dlls.bat release
  • 53: c550235 = 55: 0b15fed cmake: install headless-git.

  • 56: 3571067 = 56: b5ae0a0 Add schannel to curl installation

  • 57: 4577284 = 57: 7ea5028 cmake(): allow setting HOST_CPU for cross-compilation

  • 60: 397a219 = 58: c038faf mingw: allow for longer paths in parse_interpreter()

  • 61: 58527fa = 59: e52d8ed compat/vcbuild: document preferred way to build in Visual Studio

  • 62: 2458879 = 60: 866758a http: optionally send SSL client certificate

  • 63: e3e97e3 = 61: 1a39b65 CMake: default Visual Studio generator has changed

  • 65: 22f3948 = 62: d99334c .gitignore: add Visual Studio CMakeSetting.json file

  • 58: bef2fd8 = 63: 2819b4f subtree: update contrib/subtree test target

  • 59: 4caf23e (upstream: 9f39e2f) < -: ------------ ci(vs-build): download the vcpkg artifacts using a dedicated Action

  • 67: 1e16af7 = 64: 80c9b3f CMakeLists: add default "x64-windows" arch for Visual Studio

  • 64: 8d3a9c3 = 65: 150fc9e hash-object: demonstrate a >4GB/LLP64 problem

  • 69: e415565 = 66: 3800a28 ci: run contrib/subtree tests in CI builds

  • 70: 1f8af74 = 67: 30158eb CMake: show Win32 and Generator_platform build-option values

  • 71: e28ff41 = 68: 30c9806 init: do parse all core.* settings early

  • 72: 583862f = 69: b6675e0 Enable the built-in FSMonitor as an experimental feature

  • 66: 8f8e358 = 70: 00b8037 write_object_file_literally(): use size_t

  • 68: e5ed7b2 = 71: d5dc8b2 object-file.c: use size_t for header lengths

  • 73: 517c1a6 = 72: 3b81095 hash algorithms: use size_t for section lengths

  • 74: b8fdb4a = 73: 138987c hash-object --stdin: verify that it works with >4GB/LLP64

  • 75: e65991d = 74: 03b4d54 hash-object: add another >4GB/LLP64 test case

  • 76: 3903e5d = 75: 6caf7c9 setup: properly use "%(prefix)/" when in WSL

  • 78: 3b5cc75 = 76: 065337c hash-object: add a >4GB/LLP64 test case using filtered input

  • 79: 16151ee = 77: 301048a compat/mingw.c: do not warn when failing to get owner

  • 80: a75e8ed = 78: 4d925f5 mingw: $env:TERM="xterm-256color" for newer OSes

  • 81: 22b207e = 79: a4dc735 winansi: check result and Buffer before using Name

  • 83: f80b82e = 80: 38a219e vcxproj: allow building with NO_PERL again

  • 84: 1c8aa39 = 81: 0cd5262 vcxproj: require C11

  • 85: cdf5b39 = 82: 1d0780b vcxproj: ignore the -pedantic option

  • 86: 47281fe = 83: 4c51d47 vcxproj: include reftable when committing .vcxproj files

  • 87: 6e8388e = 84: ba05b17 vcxproj: handle libreftable_test, too

  • 88: ce12457 = 85: 85874a1 vcxproj: avoid escaping double quotes in the defines

  • 89: d3670de = 86: 65c7df4 ci: adjust Azure Pipeline for runs_on_pool

  • 90: 275b51b = 87: 60e1dc4 ci: stop linking the prove cache

  • 91: 5f3c183 = 88: d33fb7d ci: reinstate Azure Pipelines support

  • 92: 50c3484 = 89: 074f591 azure-pipeline: drop the GETTEXT_POISON job

  • 77: 3c8f74a = 90: fae12b0 Add config option windows.appendAtomically

  • 93: e230b5a = 91: 06e2381 azure-pipeline: stop hard-coding apt-get calls

  • 82: 61b8e4d = 92: 30899bf mingw: change core.fsyncObjectFiles = 1 by default

  • 94: 6d0c1e6 = 93: dd78210 azure-pipeline: drop the code to write to/read from a file share

  • 95: 49ba5bd = 94: ae18a1c azure-pipeline: use partial clone/parallel checkout to initialize minimal-sdk

  • 96: 7f85f71 = 95: 3c8827b bswap.h: add support for built-in bswap functions

  • 97: 54bb1f2 = 96: 57cbc42 azure-pipeline: downcase the job name of the Linux32 job

  • 98: b8f5bb9 = 97: 9c686c9 config.mak.uname: add support for clangarm64

  • 99: ebe75f6 = 98: be6056f MinGW: link as terminal server aware

  • 100: 59dff1b = 99: a4f6141 azure-pipeline: run static-analysis on jammy

  • 101: 690942e = 100: 40fe633 Fix Windows version resources

  • 102: 624374a = 101: f3d1c55 ci: create clangarm64-build.yml

  • 104: 2d840aa ! 102: 7eeb802 http: optionally load libcurl lazily

    @@ compat/lazyload-curl.c (new)
     +	return f;
     +}
     +
    ++typedef struct curl_version_info_data *(*curl_version_info_type)(CURLversion version);
    ++static curl_version_info_type curl_version_info_func;
    ++
     +typedef char *(*curl_easy_escape_type)(CURL *handle, const char *string, int length);
     +static curl_easy_escape_type curl_easy_escape_func;
     +
    @@ compat/lazyload-curl.c (new)
     +	if (!libcurl)
     +		die("failed to load library '%s'", LIBCURL_FILE_NAME("libcurl"));
     +
    ++	curl_version_info_func = (curl_version_info_type)load_function(libcurl, "curl_version_info");
     +	curl_easy_escape_func = (curl_easy_escape_type)load_function(libcurl, "curl_easy_escape");
     +	curl_free_func = (curl_free_type)load_function(libcurl, "curl_free");
     +	curl_global_init_func = (curl_global_init_type)load_function(libcurl, "curl_global_init");
    @@ compat/lazyload-curl.c (new)
     +	curl_easy_setopt_off_t_func = (curl_easy_setopt_off_t_type)curl_easy_setopt_func;
     +}
     +
    ++struct curl_version_info_data *curl_version_info(CURLversion version)
    ++{
    ++	lazy_load_curl();
    ++	return curl_version_info_func(version);
    ++}
    ++
     +char *curl_easy_escape(CURL *handle, const char *string, int length)
     +{
     +	lazy_load_curl();
  • 105: a367f87 ! 103: 00f1088 http: support lazy-loading libcurl also on Windows

    @@ compat/lazyload-curl.c: static func_t load_function(void *handle, const char *na
     +}
     +#endif
      
    - typedef char *(*curl_easy_escape_type)(CURL *handle, const char *string, int length);
    - static curl_easy_escape_type curl_easy_escape_func;
    + typedef struct curl_version_info_data *(*curl_version_info_type)(CURLversion version);
    + static curl_version_info_type curl_version_info_func;
  • 106: 633dced = 104: 6d8e07c http: when loading libcurl lazily, allow for multiple SSL backends

  • 103: 56dec0a = 105: 1aa651e status: fix for old-style submodules with commondir

  • 107: 621730f = 106: f5fc17d windows: skip linking git-<command> for built-ins

  • 108: 7ead52c = 107: d656540 windows: fix Repository>Explore Working Copy

  • 109: ba81ee1 = 108: 9780d3a mingw: do load libcurl dynamically by default

  • 110: 841c772 = 109: 4325885 Add a GitHub workflow to verify that Git/Scalar work in Nano Server

  • 111: 33a863c = 110: 6f70ef4 mingw: suggest windows.appendAtomically in more cases

  • 112: e65eaf3 = 111: f1898a0 win32: use native ANSI sequence processing, if possible

  • 113: f95ea4c = 112: 9b44ed4 git.rc: include winuser.h

  • 114: 1554329 (upstream: 46cbfd3) < -: ------------ build(deps): bump microsoft/setup-msbuild from 1 to 2

  • 115: e18dfdf = 113: afecd4a common-main.c: fflush stdout buffer upon exit

  • 116: ae0dde9 = 114: 377cb33 t5601/t7406(mingw): do run tests with symlink support

  • 117: 1193a26 = 115: 5042e2d win32: ensure that localtime_r() is declared even in i686 builds

  • 118: 0cc3662 = 116: a56147b Fallback to AppData if XDG_CONFIG_HOME is unset

  • 119: 04f1275 = 117: 112efba run-command: be helpful with Git LFS fails on Windows 7

  • 240: 8cd7b07 = 118: a7dcca5 ci: remove 'Upload failed tests' directories' step from linux32 jobs

  • 120: b7cd40e = 119: cec19bb Win32: make FILETIME conversion functions public

  • 121: e7d1f11 = 120: 237f9dd Win32: dirent.c: Move opendir down

  • 122: 0b7f4e5 = 121: dc626be mingw: make the dirent implementation pluggable

  • 123: 9dee806 = 122: cc74000 Win32: make the lstat implementation pluggable

  • 124: e893716 = 123: 711da7f mingw: add infrastructure for read-only file system level caches

  • 125: 377e9f2 = 124: 91d2040 mingw: add a cache below mingw's lstat and dirent implementations

  • 126: a7f3abb = 125: da8579d fscache: load directories only once

  • 127: d41690a = 126: 3fb0e0b fscache: add key for GIT_TRACE_FSCACHE

  • 128: 7234e42 = 127: db1763d fscache: remember not-found directories

  • 129: bccde80 = 128: 3d53293 fscache: add a test for the dir-not-found optimization

  • 130: 99e7e06 = 129: a598846 add: use preload-index and fscache for performance

  • 131: 037d27a = 130: 6cc1649 dir.c: make add_excludes aware of fscache during status

  • 132: 76c92c9 = 131: 5a2c256 fscache: make fscache_enabled() public

  • 133: 052cecc = 132: 07cec99 dir.c: regression fix for add_excludes with fscache

  • 134: 6b57266 = 133: f16ef35 fetch-pack.c: enable fscache for stats under .git/objects

  • 135: f202666 = 134: 0b3cb86 checkout.c: enable fscache for checkout again

  • 136: 97c78bd = 135: 56cf170 Enable the filesystem cache (fscache) in refresh_index().

  • 137: 049b1e0 = 136: 747bfe0 fscache: use FindFirstFileExW to avoid retrieving the short name

  • 138: 5f4a106 = 137: d45c22b status: disable and free fscache at the end of the status command

  • 139: 7d97932 = 138: fc7b9bf fscache: add GIT_TEST_FSCACHE support

  • 140: b57a393 = 139: 284eb3e fscache: add fscache hit statistics

  • 141: abddb33 = 140: 2b1802f mem_pool: add GIT_TRACE_MEMPOOL support

  • 142: e44c50f = 141: 5505563 fscache: fscache takes an initial size

  • 143: a0c37ac = 142: 3972d4c fscache: update fscache to be thread specific instead of global

  • 144: 6200027 = 143: a6a4906 fscache: teach fscache to use mempool

  • 145: 8893056 = 144: 29054d2 fscache: make fscache_enable() thread safe

  • 146: b9fa901 = 145: 8be5c62 fscache: teach fscache to use NtQueryDirectoryFile

  • 148: bcf7399 = 146: 8b5b156 unpack-trees: enable fscache for sparse-checkout

  • 147: 30bf086 = 147: 949503d git-gui: provide question helper for retry fallback on Windows

  • 150: da125b3 = 148: dd188fa fscache: remember the reparse tag for each entry

  • 149: 921c8bb = 149: 26cb463 git gui: set GIT_ASKPASS=git-gui--askpass if not set yet

  • 152: 9c58e39 = 150: 87a73ce fscache: implement an FSCache-aware is_mount_point()

  • 151: d98697a = 151: d74467f git-gui--askyesno: fix funny text wrapping

  • 154: 25e046a = 152: 7d7c8d2 clean: make use of FSCache

  • 155: d9094e4 = 153: 193fea2 gitk: Unicode file name support

  • 156: 1481a08 = 154: edebad2 gitk: Use an external icon file on Windows

  • 153: 5de7512 = 155: 0792487 git-gui--askyesno: allow overriding the window title

  • 157: 0289551 = 156: 5040e8b gitk: fix arrow keys in input fields with Tcl/Tk >= 8.6

  • 158: 87800f9 = 157: f57f1f1 git-gui--askyesno (mingw): use Git for Windows' icon, if available

  • 159: 9c62bf8 = 158: 2dfff15 gitk: make the "list references" default window width wider

  • 160: 9c37c87 = 159: ed4cdb7 pack-objects (mingw): demonstrate a segmentation fault with large deltas

  • 161: 4e3cb14 = 160: 90a0bd5 mingw: support long paths

  • 162: e76dda5 = 161: f0c7c00 Win32: fix 'lstat("dir/")' with long paths

  • 163: 051305c = 162: 2a1b191 win32(long path support): leave drive-less absolute paths intact

  • 164: 9527b69 = 163: b1eb679 mingw: Support git_terminal_prompt with more terminals

  • 165: f7d7f05 = 164: 6e351ec compat/terminal.c: only use the Windows console if bash 'read -r' fails

  • 166: 8f5d537 = 165: 3dab29b mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method

  • 167: f14d5a4 = 166: 08d520d Unbreak interactive GPG prompt upon signing

  • 169: d53cd82 = 167: 12a0a6f compat/fsmonitor/fsm-*-win32: support long paths

  • 170: ef5167e = 168: caae38a clean: suggest using core.longPaths if paths are too long to remove

  • 168: b1b1077 = 169: a1f7c57 strbuf_readlink: don't call readlink twice if hint is the exact link size

  • 171: 6a816cd = 170: 5bcdd25 strbuf_readlink: support link targets that exceed PATH_MAX

  • 172: ee21e77 = 171: 0ccd0dd lockfile.c: use is_dir_sep() instead of hardcoded '/' checks

  • 173: 7fe1ccc = 172: a1ba0b3 Win32: don't call GetFileAttributes twice in mingw_lstat()

  • 174: 8a7e8f9 = 173: 6cc554f Win32: implement stat() with symlink support

  • 175: 7e23bf9 = 174: bfb6c70 Win32: remove separate do_lstat() function

  • 176: 253c63a = 175: f027e0c Win32: let mingw_lstat() error early upon problems with reparse points

  • 177: 24dac25 = 176: 793e318 mingw: teach fscache and dirent about symlinks

  • 178: a69f2e5 = 177: ba6cfb4 Win32: lstat(): return adequate stat.st_size for symlinks

  • 179: 72725b4 = 178: 4cac428 Win32: factor out retry logic

  • 180: 707e317 = 179: a2d3f15 Win32: change default of 'core.symlinks' to false

  • 181: 47fd6bd = 180: 9bc14e2 Win32: add symlink-specific error codes

  • 182: 1e50c7c = 181: d34eeb7 Win32: mingw_unlink: support symlinks to directories

  • 183: c523b72 = 182: ab63096 Win32: mingw_rename: support renaming symlinks

  • 184: 66496a2 = 183: d40f2b0 Win32: mingw_chdir: change to symlink-resolved directory

  • 185: ef1e8bf = 184: fd2b6ed Win32: implement readlink()

  • 186: 746288b = 185: c75bdec mingw: lstat: compute correct size for symlinks

  • 187: 53a5490 = 186: 5e2eb17 Win32: implement basic symlink() functionality (file symlinks only)

  • 188: e7b6604 = 187: 102cf11 Win32: symlink: add support for symlinks to directories

  • 189: 23a15bb = 188: c96e816 mingw: try to create symlinks without elevated permissions

  • 190: 3b32462 = 189: c582bd8 mingw: emulate stat() a little more faithfully

  • 191: 4d82909 = 190: 97d618e mingw: special-case index entries for symlinks with buggy size

  • 192: 58c15fa = 191: f763ec7 mingw: introduce code to detect whether we're inside a Windows container

  • 193: d30013d = 192: b1a2f3c mingw: when running in a Windows container, try to rename() harder

  • 194: 062c958 = 193: 38d49a6 mingw: move the file_attr_to_st_mode() function definition

  • 195: d645aeb = 194: 41f035f Win32: symlink: move phantom symlink creation to a separate function

  • 196: 4adbd2d = 195: ceee7f1 Introduce helper to create symlinks that knows about index_state

  • 197: 42d9647 = 196: 9f76016 mingw: allow to specify the symlink type in .gitattributes

  • 198: c7b8552 = 197: 1cf49e5 Win32: symlink: add test for symlink attribute

  • 199: 000c982 = 198: 6b1d24d mingw: explicitly specify with which cmd to prefix the cmdline

  • 200: 04d72c8 = 199: a850248 mingw: when path_lookup() failed, try BusyBox

  • 202: eb76a36 = 200: 78a45cd test-lib: avoid unnecessary Perl invocation

  • 204: 32bae6f = 201: 4bcaf18 test-tool: learn to act as a drop-in replacement for iconv

  • 201: 2f3778e = 202: e86fe24 mingw: Windows Docker volumes are not symbolic links

  • 205: 38ad181 = 203: b72eed6 tests(mingw): if iconv is unavailable, use test-helper --iconv

  • 203: 488cde8 = 204: 0becea9 mingw: work around rename() failing on a read-only file

  • 206: 97d7251 = 205: f6a5a9a gitattributes: mark .png files as binary

  • 207: 969d646 = 206: ab6ffcf tests: move test PNGs into t/lib-diff/

  • 208: d474582 = 207: a07c026 tests: only override sort & find if there are usable ones in /usr/bin/

  • 209: 509998d = 208: b4cfcbc tests: use the correct path separator with BusyBox

  • 210: b06baab = 209: 68ff010 mingw: only use Bash-ism builtin pwd -W when available

  • 211: 1556e20 = 210: cfa1803 tests (mingw): remove Bash-specific pwd option

  • 212: 759b32f = 211: d48d5f2 test-lib: add BUSYBOX prerequisite

  • 213: 6b19545 = 212: da65a4f t5003: use binary file from t/lib-diff/

  • 214: ef44613 = 213: b67f7f0 t5532: workaround for BusyBox on Windows

  • 215: ca56f74 = 214: 103d7b3 t5605: special-case hardlink test for BusyBox-w32

  • 216: 5f9e9fd = 215: 14c9d27 t5813: allow for $PWD to be a Windows path

  • 217: 43106ca = 216: 3c78f25 t9200: skip tests when $PWD contains a colon

  • 218: a84064a = 217: 66f7a2d mingw: add a Makefile target to copy test artifacts

  • 220: 2bcd436 = 218: 19430b7 mingw: kill child processes in a gentler way

  • 221: 086e4e2 = 219: cfce051 mingw: do not call xutftowcs_path in mingw_mktemp

  • 219: 8342d6d ! 220: e315485 mingw: optionally enable wsl compability file mode bits

    @@ compat/win32/fscache.c: static struct fsentry *fseentry_create_entry(struct fsca
      			     &(fse->u.s.st_mtim));
      	filetime_to_timespec((FILETIME *)&(fdata->CreationTime),
      			     &(fse->u.s.st_ctim));
    -+	if (fdata->EaSize > 0 && are_wsl_compatible_mode_bits_enabled()) {
    -+		copy_wsl_mode_bits_from_disk(fdata->FileName,
    -+			fdata->FileNameLength / sizeof(wchar_t), &fse->st_mode);
    ++	if (fdata->EaSize > 0 &&
    ++	    sizeof(buf) >= (list ? list->len+1 : 0) + fse->len+1 &&
    ++	    are_wsl_compatible_mode_bits_enabled()) {
    ++		size_t off = 0;
    ++		wchar_t wpath[MAX_LONG_PATH];
    ++		if (list && list->len) {
    ++			memcpy(buf, list->dirent.d_name, list->len);
    ++			buf[list->len] = '/';
    ++			off = list->len + 1;
    ++		}
    ++		memcpy(buf + off, fse->dirent.d_name, fse->len);
    ++		buf[off + fse->len] = '\0';
    ++		if (xutftowcs_long_path(wpath, buf) >= 0)
    ++			copy_wsl_mode_bits_from_disk(wpath, -1, &fse->st_mode);
     +	}
      
      	return fse;
    @@ compat/win32/wsl.c (new)
     +	return ret;
     +}
     +
    ++#ifndef LX_FILE_METADATA_HAS_UID
     +#define LX_FILE_METADATA_HAS_UID 0x1
     +#define LX_FILE_METADATA_HAS_GID 0x2
     +#define LX_FILE_METADATA_HAS_MODE 0x4
    @@ compat/win32/wsl.c (new)
     +	uint32_t LxDeviceIdMajor;
     +	uint32_t LxDeviceIdMinor;
     +} FILE_STAT_LX_INFORMATION, *PFILE_STAT_LX_INFORMATION;
    ++#endif
     +
     +/*
     + * This struct is extended from the original FILE_FULL_EA_INFORMATION of
  • 222: dc99899 = 221: 034eb03 mingw: really handle SIGINT

  • 223: a24d216 = 222: d9da48c Partially un-revert "editor: save and reset terminal after calling EDITOR"

  • 224: f292f84 = 223: 69a6f8e reset: reinstate support for the deprecated --stdin option

  • 225: a1f4464 = 224: 2d20861 Describe Git for Windows' architecture [no ci]

  • 226: 3e8714f = 225: 79d8838 Modify the Code of Conduct for Git for Windows

  • 227: c507a4c = 226: 56ce15a CONTRIBUTING.md: add guide for first-time contributors

  • 228: 96d94f9 = 227: 46a6c34 README.md: Add a Windows-specific preamble

  • 229: 478f75d = 228: 34bbb92 Add an issue template

  • 230: 827904f = 229: b0d782a Modify the GitHub Pull Request template (to reflect Git for Windows)

  • 231: d0abe43 = 230: 79df07f .github: Add configuration for the Sentiment Bot

  • 232: 7ac858a = 231: 4b11981 Add a GitHub workflow to monitor component updates

  • 233: 1284416 = 232: 15f95ac Document how $HOME is set on Windows

  • 234: 36154c9 = 233: 7337fe1 fsmonitor: reintroduce core.useBuiltinFSMonitor

  • 235: 1e09949 = 234: b347f2c dependabot: help keeping GitHub Actions versions up to date

  • 236: 13b6f12 = 235: 95bf514 SECURITY.md: document Git for Windows' policies

  • 237: 6b262fb < -: ------------ fixup! mingw: optionally enable wsl compability file mode bits

  • 238: 15bcde9 < -: ------------ fixup! mingw: optionally enable wsl compability file mode bits

  • 239: 6fe9491 < -: ------------ fixup! http: optionally load libcurl lazily

dscho and others added 30 commits September 18, 2024 08:51
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>
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>
…imal-sdk

The Azure Pipeline `git-sdk-64-minimal` was retired...

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
CLANGARM64 is a relatively new MSYSTEM added by the MSYS2 team. In order
to have Git build correctly for this platform, let's add some
configuration for it to config.mak.uname.

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
This is inspired by d051ed7 (.github/workflows/main.yml: run
static-analysis on bionic, 2021-02-08) and by ef46584 (ci: update
'static-analysis' to Ubuntu 22.04, 2022-08-23), adapted to the Azure
Pipeline.

When Azure Pipelines' build agents transitioned 'ubuntu-latest' from
18.04 to 20.04, it broke our `static-analysis` job, since Coccinelle
was not madeavailable on Ubuntu focal (it is only available in the
universe suite).

This is not an issue with Ubuntu 22.04, but we will only know whether it
is an issue with 24.04 when _that_ comes out. So let's play it safe and
pin the `static_analysis` job to the latest Ubuntu version that we know
to offer a working Coccinelle package.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Whith Windows 2000, Microsoft introduced a flag to the PE header to mark executables as
"terminal server aware". Windows terminal servers provide a redirected Windows directory and
redirected registry hives when launching legacy applications without this flag set. Since we
do not use any INI files in the Windows directory and don't write to the registry, we don't
need  this additional preparation. Telling the OS that we don't need this should provide
slightly improved startup times in terminal server environments.

When building for supported Windows Versions with MSVC the /TSAWARE linker flag is
automatically set, but MinGW requires us to set the --tsaware flag manually.

This partially addresses git-for-windows#3935.

Signed-off-by: Matthias Aßhauer <mha1993@live.de>
Add FileVersion, which is a required field
As not all required fields were present, none were being included
Fixes git-for-windows#4090

Signed-off-by: Kiel Hurley <kielhurley@gmail.com>
Newer compiler versions, like GCC 10 and Clang 12, have built-in
functions for bswap32 and bswap64. This comes in handy, for example,
when targeting CLANGARM64 on Windows, which would not be supported
without this logic.

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
No GitHub-hosted ARM64 runners are available at the moment of writing,
but folks can leverage self-hosted runners of this architecture. This CI
pipeline comes in handy for forks of the git-for-windows/git project
that have such runners available. The pipeline can be kicked off
manually through a workflow_dispatch.

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
This compile-time option allows to ask Git to load libcurl dynamically
at runtime.

Together with a follow-up patch that optionally overrides the file name
depending on the `http.sslBackend` setting, this kicks open the door for
installing multiple libcurl flavors side by side, and load the one
corresponding to the (runtime-)configured SSL/TLS backend.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This implements the Windows-specific support code, because everything is
slightly different on Windows, even loading shared libraries.

Note: I specifically do _not_ use the code from
`compat/win32/lazyload.h` here because that code is optimized for
loading individual functions from various system DLLs, while we
specifically want to load _many_ functions from _one_ DLL here, and
distinctly not a system DLL (we expect libcurl to be located outside
`C:\Windows\system32`, something `INIT_PROC_ADDR` refuses to work with).
Also, the `curl_easy_getinfo()`/`curl_easy_setopt()` functions are
declared as vararg functions, which `lazyload.h` cannot handle. Finally,
we are about to optionally override the exact file name that is to be
loaded, which is a goal contrary to `lazyload.h`'s design.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The previous commits introduced a compile-time option to load libcurl
lazily, but it uses the hard-coded name "libcurl-4.dll" (or equivalent
on platforms other than Windows).

To allow for installing multiple libcurl flavors side by side, where
each supports one specific SSL/TLS backend, let's first look whether
`libcurl-<backend>-4.dll` exists, and only use `libcurl-4.dll` as a fall
back.

That will allow us to ship with a libcurl by default that only supports
the Secure Channel backend for the `https://` protocol. This libcurl
won't suffer from any dependency problem when upgrading OpenSSL to a new
major version (which will change the DLL name, and hence break every
program and library that depends on it).

This is crucial because Git for Windows relies on libcurl to keep
working when building and deploying a new OpenSSL package because that
library is used by `git fetch` and `git clone`.

Note that this feature is by no means specific to Windows. On Ubuntu,
for example, a `git` built using `LAZY_LOAD_LIBCURL` will use
`libcurl.so.4` for `http.sslbackend=openssl` and `libcurl-gnutls.so.4`
for `http.sslbackend=gnutls`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In f9b7573 (repository: free fields before overwriting them,
2017-09-05), Git was taught to release memory before overwriting it, but
357a03e (repository.c: move env-related setup code back to
environment.c, 2018-03-03) changed the code so that it would not
_always_ be overwritten.

As a consequence, the `commondir` attribute would point to
already-free()d memory.

This seems not to cause problems in core Git, but there are add-on
patches in Git for Windows where the `commondir` attribute is
subsequently used and causing invalid memory accesses e.g. in setups
containing old-style submodules (i.e. the ones with a `.git` directory
within theirs worktrees) that have `commondir` configured.

This fixes git-for-windows#4083.

Signed-off-by: Andrey Zabavnikov <zabavnikov@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
It is merely a historical wart that, say, `git-commit` exists in the
`libexec/git-core/` directory, a tribute to the original idea to let Git
be essentially a bunch of Unix shell scripts revolving around very few
"plumbing" (AKA low-level) commands.

Git has evolved a lot from there. These days, most of Git's
functionality is contained within the `git` executable, in the form of
"built-in" commands.

To accommodate for scripts that use the "dashed" form of Git commands,
even today, Git provides hard-links that make the `git` executable
available as, say, `git-commit`, just in case that an old script has not
been updated to invoke `git commit`.

Those hard-links do not come cheap: they take about half a minute for
every build of Git on Windows, they are mistaken for taking up huge
amounts of space by some Windows Explorer versions that do not
understand hard-links, and therefore many a "bug" report had to be
addressed.

The "dashed form" has been officially deprecated in Git version 1.5.4,
which was released on February 2nd, 2008, i.e. a very long time ago.
This deprecation was never finalized by skipping these hard-links, but
we can start the process now, in Git for Windows.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Since Git v2.39.1, we are a bit more stringent in searching the PATH. In
particular, we specifically require the `.exe` suffix.

However, the `Repository>Explore Working Copy` command asks for
`explorer.exe` to be found on the `PATH`, which _already_ has that
suffix.

Let's unstartle the PATH-finding logic about this scenario.

This fixes git-for-windows#4356

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This will help with Git for Windows' maintenance going forward: It
allows Git for Windows to switch its primary libcurl to a variant
without the OpenSSL backend, while still loading an alternate when
setting `http.sslBackend = openssl`.

This is necessary to avoid maintenance headaches with upgrading OpenSSL:
its major version name is encoded in the shared library's file name and
hence major version updates (temporarily) break libraries that are
linked against the OpenSSL library.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In Git for Windows v2.39.0, we fixed a regression where `git.exe` would
no longer work in Windows Nano Server (frequently used in Docker
containers).

This GitHub workflow can be used to verify manually that the Git/Scalar
executables work in Nano Server.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho and others added 23 commits September 18, 2024 09:46
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>
Git documentation refers to $HOME and $XDG_CONFIG_HOME often, but does not specify how or where these values come from on Windows where neither is set by default. The new documentation reflects the behavior of setup_windows_environment() in compat/mingw.c.

Signed-off-by: Alejandro Barreto <alejandro.barreto@ni.com>
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 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>
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
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 linked an issue Sep 18, 2024 that may be closed by this pull request
@dscho
Copy link
Member Author

dscho commented Sep 18, 2024

/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 dscho mentioned this pull request Sep 18, 2024
@dscho

This comment was marked as resolved.

@dscho
Copy link
Member Author

dscho commented Sep 18, 2024

/release

The release-git workflow run was started

@gitforwindowshelper gitforwindowshelper bot merged commit 6cd9c83 into git-for-windows:main Sep 18, 2024
35 of 36 checks passed
@dscho dscho deleted the rebase-to-v2.46.1 branch September 18, 2024 10:55
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.46.1