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.0 rc1 #5066

Merged

Conversation

mjcheetham
Copy link
Member

Range diff:
  1:  26550a9dd9 =   1:  d1cb61807d gitk(Windows): avoid inadvertently calling executables in the worktree
  2:  13241c665c =   2:  4955c47b41 t9350: point out that refs are not updated correctly
  3:  f2322e9a68 =   3:  d5ff18b5a4 transport-helper: add trailing --
 10:  3eddbf0ccb =   4:  d4ded5112a mingw: include the Python parts in the build
  4:  fcf85d7f0e =   5:  5352fa9f2f remote-helper: check helper status after import/export
  5:  7024c368c6 =   6:  544a8c3d60 mingw: demonstrate a problem with certain absolute paths
  6:  12ba7b09a2 =   7:  e12589cdfd clean: do not traverse mount points
 11:  95736c51ac =   8:  1b3c89280a win32/pthread: avoid name clashes with winpthread
  7:  072f5fc0e8 =   9:  31aba0624e Always auto-gc after calling a fast-import transport
  8:  48d5b8e4c3 =  10:  b3d3db92a8 mingw: allow absolute paths without drive prefix
  9:  310d96c24c =  11:  82c54d1c80 clean: remove mount points when possible
 12:  bc214cd32c =  12:  304d0a8e35 git-compat-util: avoid redeclaring _DEFAULT_SOURCE
 13:  4e0f37e39c =  13:  13ad4c7f06 Import the source code of mimalloc v2.1.2
 14:  94111ce1b0 =  14:  0f2bd553b1 mimalloc: adjust for building inside Git
 15:  74db63cd75 =  15:  39fd89ded2 mimalloc: offer a build-time option to enable it
 16:  955604396e =  16:  03377e57ee mimalloc: use "weak" random seed when statically linked
 17:  7b848e5786 =  17:  51bd029571 mingw: use mimalloc
 18:  96e8caa298 =  18:  5fa5d66667 transport: optionally disable side-band-64k
 19:  ba699c7464 =  19:  55a2f0b373 mingw: make sure `errno` is set correctly when socket operations fail
 23:  ffcb4be1d5 =  20:  5e8c59a827 mingw: ensure valid CTYPE
 24:  1a91da9f47 =  21:  c17f02a3cf mingw: demonstrate a `git add` issue with NTFS junctions
 26:  f909fbf940 =  22:  2d874a4d76 mingw: allow `git.exe` to be used instead of the "Git wrapper"
 27:  d083e1bc3e =  23:  f1ffd3a81f strbuf_realpath(): use platform-dependent API if available
 29:  c0bb70acd8 =  24:  44543df3ce mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory
 20:  160bfea1ba =  25:  f0c96ee60b mingw: do resolve symlinks in `getcwd()`
 21:  69369fe7ad =  26:  9f7dfc6b49 mingw: fix fatal error working on mapped network drives on Windows
 31:  3ca841a269 =  27:  1da6564995 clink.pl: fix MSVC compile script to handle libcurl-d.lib
 32:  15ea6fd1f7 =  28:  936e4f0499 mingw: implement a platform-specific `strbuf_realpath()`
 22:  92be77e0ba =  29:  848fc2fcc9 vcxproj: unclash project directories with build outputs
 25:  51fb690243 =  30:  f1d7176805 t5505/t5516: allow running without `.git/branches/` in the templates
 28:  72d29cdbce =  31:  ec9b955ae8 t5505/t5516: fix white-space around redirectors
 30:  3deed45196 =  32:  35d9d040a8 http: use new "best effort" strategy for Secure Channel revoke checking
 39:  8e76dae4fe =  33:  facee097b1 t3701: verify that we can add *lots* of files interactively
 40:  c15927cdca =  34:  09a34d199c git add -i: handle CR/LF line endings in the interactive input
 41:  02c1b8a80d =  35:  c9f7a9c451 commit: accept "scissors" with CR/LF line endings
 42:  94da1a48f8 =  36:  2e2e72a290 t0014: fix indentation
 43:  da9671ff9a =  37:  640fd91a10 git-gui: accommodate for intent-to-add files
 33:  08bbe39166 =  38:  61a92f2a13 clink.pl: fix libexpatd.lib link error when using MSVC
 34:  0318d5f364 =  39:  2b90bb57ba Makefile: clean up .ilk files when MSVC=1
 35:  589b856d70 =  40:  1619ba115d vcbuild: add support for compiling Windows resource files
 36:  444d7d724c =  41:  16bcb6a240 config.mak.uname: add git.rc to MSVC builds
 37:  0b96f5de8f =  42:  1eab9b9af8 clink.pl: ignore no-stack-protector arg on MSVC=1 builds
 38:  78096c06c3 =  43:  e39b4bfe26 clink.pl: move default linker options for MSVC=1 builds
 48:  bfdb850e34 =  44:  08d8457dbb buildsystems: remove duplicate clause
 50:  4814f496a7 =  45:  c4889abaed vcxproj: handle resource files, too
 52:  205141e5c4 =  46:  4004674456 vcxproj: ignore -fno-stack-protector and -fno-common
 54:  3d65a6e96f =  47:  f01c322ede vcxproj: handle GUI programs, too
 44:  4b85d4aa31 =  48:  ee2d6dd76a vcpkg_install: detect lack of Git
 45:  653406e393 =  49:  e8870da22e vcpkg_install: add comment regarding slow network connections
 46:  143e834af1 =  50:  0a14d3c6ef vcxproj: support building Windows/ARM64 binaries
 47:  8d3150b418 =  51:  be110d1cef vcbuild: install ARM64 dependencies when building ARM64 binaries
 49:  be117f28d7 =  52:  d693d30075 vcbuild: add an option to install individual 'features'
 51:  87dc592a51 =  53:  cb5a005ce6 cmake: allow building for Windows/ARM64
 53:  31477fdc8e =  54:  4c33125506 ci(vs-build) also build Windows/ARM64 artifacts
 55:  bc9ae1556a =  55:  b7bfe1fbee Add schannel to curl installation
 57:  341ea2134b =  56:  7e5d04e82e cmake(): allow setting HOST_CPU for cross-compilation
 56:  ee5ebd923a =  57:  18df154fdd cmake: install headless-git.
 62:  05062defd8 =  58:  89127696a1 ci(vs-build): download the vcpkg artifacts using a dedicated Action
 63:  7639b908d2 =  59:  d35c5f39df mingw: allow for longer paths in `parse_interpreter()`
 64:  5b8d2d1f1a =  60:  880226f720 compat/vcbuild: document preferred way to build in Visual Studio
 65:  05858252af !  61:  6032519dae http: optionally send SSL client certificate
    @@ http.c: static int http_schannel_check_revoke_mode =
      
     +static int http_auto_client_cert;
     +
    - size_t fread_buffer(char *ptr, size_t eltsize, size_t nmemb, void *buffer_)
    + static int always_auth_proactively(void)
      {
    - 	size_t size = eltsize * nmemb;
    + 	return http_proactive_auth != PROACTIVE_AUTH_NONE &&
     @@ http.c: static int http_options(const char *var, const char *value,
      		return 0;
      	}
    @@ http.c: static CURL *get_curl_handle(void)
     +			curl_easy_setopt(result, CURLOPT_SSL_OPTIONS, ssl_options);
      	}
      
    - 	if (http_proactive_auth)
    + 	if (http_proactive_auth != PROACTIVE_AUTH_NONE)
 58:  fb0110b559 =  62:  d8dbb528f2 CMake: default Visual Studio generator has changed
 59:  f583df4cc4 =  63:  a7a064c74b .gitignore: add Visual Studio CMakeSetting.json file
 60:  f2f0f0b861 =  64:  ead2296181 subtree: update `contrib/subtree` `test` target
 61:  d1b887ab1e =  65:  7e96c07b0c CMakeLists: add default "x64-windows" arch for Visual Studio
 66:  2849e28c48 =  66:  da4a58afef ci: run `contrib/subtree` tests in CI builds
 67:  7ef02bb57f =  67:  681f89aea2 CMake: show Win32 and Generator_platform build-option values
 68:  ffdd556dd0 =  68:  7bb744bbdf init: do parse _all_ core.* settings early
 69:  2f3d2c96b6 =  69:  224dd422e4 Enable the built-in FSMonitor as an experimental feature
 70:  340b1a0b3b =  70:  609f778ebc hash-object: demonstrate a >4GB/LLP64 problem
 71:  a1c7d33987 =  71:  7ddf006192 write_object_file_literally(): use size_t
 72:  a674e8fbd8 =  72:  054ed84234 object-file.c: use size_t for header lengths
 73:  0713ec4e8a =  73:  63dfc23fc2 hash algorithms: use size_t for section lengths
 74:  3c7b3ee935 =  74:  e834f3274b hash-object --stdin: verify that it works with >4GB/LLP64
 75:  3c7ce04eb3 =  75:  e174f14eaf hash-object: add another >4GB/LLP64 test case
 76:  e15e6919ec =  76:  3c03f1bee8 setup: properly use "%(prefix)/" when in WSL
 77:  d366f343a0 =  77:  5b1d9483c4 hash-object: add a >4GB/LLP64 test case using filtered input
 78:  fdcbfedd89 =  78:  0308a69ef3 compat/mingw.c: do not warn when failing to get owner
 79:  9f4937e650 =  79:  0e8d16ccc3 mingw: $env:TERM="xterm-256color" for newer OSes
 80:  3cfb5902d7 =  80:  422b7cf5b5 vcxproj: allow building with `NO_PERL` again
 81:  671c141837 =  81:  f56c057f80 vcxproj: require C11
 82:  22cdab435b =  82:  de8068c06b vcxproj: ignore the `-pedantic` option
 83:  2f3699dd2c =  83:  8b42a568d8 vcxproj: include reftable when committing `.vcxproj` files
 84:  3ca5c9d3fe =  84:  990a34278a vcxproj: handle libreftable_test, too
 85:  105dadeabd =  85:  2a78e9a4a9 vcxproj: avoid escaping double quotes in the defines
113:  94b60e91e8 =  86:  afd5d6428d Add config option `windows.appendAtomically`
 86:  e3f1e47a74 =  87:  ba626b53bd ci: adjust Azure Pipeline for `runs_on_pool`
 92:  bb5cf0602e =  88:  49b3689bb3 winansi: check result and Buffer before using Name
114:  406afe588e =  89:  9b466bd267 mingw: change core.fsyncObjectFiles = 1 by default
 87:  1aca19c662 =  90:  632f0bbab4 ci: stop linking the `prove` cache
 88:  7f39a9303d =  91:  6feff8db2f ci: reinstate Azure Pipelines support
 89:  4ca2723b3f =  92:  b047c966b3 azure-pipeline: drop the `GETTEXT_POISON` job
 90:  7b655db4e4 =  93:  cc2e2249ac azure-pipeline: stop hard-coding `apt-get` calls
 91:  90e897c708 =  94:  b2f553244d azure-pipeline: drop the code to write to/read from a file share
 93:  ac8583ec44 =  95:  851a2efd0d azure-pipeline: use partial clone/parallel checkout to initialize minimal-sdk
 95:  cf38b3a315 =  96:  78defab91c azure-pipeline: downcase the job name of the `Linux32` job
 97:  8b4bf5fa7f =  97:  b4130f7b8b MinGW: link as terminal server aware
 98:  fc07bd09fd =  98:  43b5a1bc39 azure-pipeline: run static-analysis on jammy
 99:  9bc98b21f4 =  99:  9e47b0c506 Fix Windows version resources
104:  0ef88c8360 = 100:  83a57f57ee http: optionally load libcurl lazily
 94:  9d1bd22484 = 101:  3c0da74ea7 bswap.h: add support for built-in bswap functions
105:  06b7556cfa = 102:  f9283ab1e0 http: support lazy-loading libcurl also on Windows
 96:  ed563a6142 = 103:  ded748de77 config.mak.uname: add support for clangarm64
106:  317bc19c9d = 104:  002d627322 http: when loading libcurl lazily, allow for multiple SSL backends
100:  578a19096a = 105:  942f80151f ci: create clangarm64-build.yml
101:  a078d6caa7 = 106:  11c204e0cb status: fix for old-style submodules with commondir
102:  584c68a5a9 = 107:  9427ac2435 windows: skip linking `git-<command>` for built-ins
103:  540775a951 = 108:  e597086059 windows: fix Repository>Explore Working Copy
107:  8c624a1ff9 = 109:  c9921380d3 mingw: do load libcurl dynamically by default
108:  6b82cdfba3 = 110:  20dfdb4e58 Add a GitHub workflow to verify that Git/Scalar work in Nano Server
115:  d33714f801 = 111:  402db33500 mingw: suggest `windows.appendAtomically` in more cases
109:  b36763e518 = 112:  886bc6bae9 win32: use native ANSI sequence processing, if possible
110:  9cb98e1387 = 113:  0c3ee731df git.rc: include winuser.h
111:  12dc571b86 = 114:  e417e66f30 build(deps): bump microsoft/setup-msbuild from 1 to 2
112:  59514d2ecf = 115:  d17c1c44d6 common-main.c: fflush stdout buffer upon exit
116:  907ec73f74 = 116:  63e6c12ef3 t5601/t7406(mingw): do run tests with symlink support
117:  e36580db4e = 117:  76c541f946 win32: ensure that `localtime_r()` is declared even in i686 builds
118:  2a5b836b3d = 118:  81d222fa97 Fallback to AppData if XDG_CONFIG_HOME is unset
119:  46d14a6f71 ! 119:  303505edd3 run-command: be helpful with Git LFS fails on Windows 7
    @@ Commit message
      ## compat/win32/path-utils.c ##
     @@
      #include "../../git-compat-util.h"
    + #include "../../environment.h"
     +#include "../../wrapper.h"
     +#include "../../strbuf.h"
     +#include "../../versioncmp.h"
      
      int win32_has_dos_drive_prefix(const char *path)
      {
    -@@ compat/win32/path-utils.c: int win32_offset_1st_component(const char *path)
    - 
    - 	return pos + is_dir_sep(*pos) - path;
    +@@ compat/win32/path-utils.c: int win32_fspathcmp(const char *a, const char *b)
    + {
    + 	return win32_fspathncmp(a, b, (size_t)-1);
      }
     +
     +static int read_at(int fd, char *buffer, size_t offset, size_t size)
    @@ compat/win32/path-utils.c: int win32_offset_1st_component(const char *path)
     +	 * Git LFS v3.5.1 fails with an Access Violation on Windows 7; That
     +	 * would usually show up as an exit code 0xc0000005. For some reason
     +	 * (probably because at this point, we no longer have the _original_
    -+	 * HANDLE that was returned by `CreateProcess()`) we get 0xb00 instead.
    ++	 * HANDLE that was returned by `CreateProcess()`) we observe other
    ++	 * values like 0xb00 and 0x2 instead. Since the exact exit code
    ++	 * seems to be inconsistent, we check for a non-zero exit status.
     +	 */
    -+	if (exit_code != 0x0b00)
    ++	if (exit_code == 0)
     +		return;
     +	if (GetVersion() >> 16 > 7601)
     +		return; /* Warn only on Windows 7 or older */
    -+	if (!starts_with(argv0, "git-lfs ") ||
    -+	    !(git_lfs = locate_in_PATH("git-lfs")))
    ++	if (!istarts_with(argv0, "git-lfs ") &&
    ++	    strcasecmp(argv0, "git-lfs"))
    ++		return;
    ++	if (!(git_lfs = locate_in_PATH("git-lfs")))
     +		return;
     +	if (get_go_version(git_lfs, buffer, sizeof(buffer)) > 0 &&
     +	    skip_prefix(buffer, "go", &p) &&
    @@ compat/win32/path-utils.c: int win32_offset_1st_component(const char *path)
     +}
     
      ## compat/win32/path-utils.h ##
    -@@ compat/win32/path-utils.h: static inline int win32_has_dir_sep(const char *path)
    - int win32_offset_1st_component(const char *path);
    - #define offset_1st_component win32_offset_1st_component
    +@@ compat/win32/path-utils.h: int win32_fspathcmp(const char *a, const char *b);
    + int win32_fspathncmp(const char *a, const char *b, size_t count);
    + #define fspathncmp win32_fspathncmp
      
     +void win32_warn_about_git_lfs_on_windows7(int exit_code, const char *argv0);
     +#define warn_about_git_lfs_on_windows7 win32_warn_about_git_lfs_on_windows7
    @@ compat/win32/path-utils.h: static inline int win32_has_dir_sep(const char *path)
     
      ## git-compat-util.h ##
     @@ git-compat-util.h: static inline int git_offset_1st_component(const char *path)
    - #define offset_1st_component git_offset_1st_component
    + #define fspathncmp git_fspathncmp
      #endif
      
     +#ifndef warn_about_git_lfs_on_windows7
120:  18b605d337 <   -:  ---------- cmake: fix build of `t-oidtree`
239:  ee3ee00a19 = 120:  0818e17c0f asciidoctor: fix `synopsis` rendering
121:  691eb43cc1 = 121:  6d4ec2478d Win32: make FILETIME conversion functions public
122:  018bf863da = 122:  4e7b63ea7f Win32: dirent.c: Move opendir down
123:  6dc619e328 = 123:  b08f49f5ec mingw: make the dirent implementation pluggable
124:  ecfcb3f8e0 = 124:  128ef21dd6 Win32: make the lstat implementation pluggable
125:  9b7f879d47 = 125:  edc578fc33 mingw: add infrastructure for read-only file system level caches
126:  fa0c711d19 = 126:  d50cdd7880 mingw: add a cache below mingw's lstat and dirent implementations
127:  b46ee27378 = 127:  0645781c48 fscache: load directories only once
128:  b5671556b9 = 128:  890ee7c8f5 fscache: add key for GIT_TRACE_FSCACHE
129:  fba2496aab = 129:  9d80676ea3 fscache: remember not-found directories
130:  1953499697 = 130:  4b5cd4d0f1 fscache: add a test for the dir-not-found optimization
131:  f49e942117 = 131:  82dceb1d3a add: use preload-index and fscache for performance
132:  d3c4d307ee = 132:  0783329285 dir.c: make add_excludes aware of fscache during status
133:  c0e1534601 = 133:  0000182ea5 fscache: make fscache_enabled() public
134:  98b7d33967 = 134:  1da0b8651e dir.c: regression fix for add_excludes with fscache
135:  8d36ca9b50 = 135:  0de6cdda94 fetch-pack.c: enable fscache for stats under .git/objects
136:  d18a16b999 = 136:  d27c615db4 checkout.c: enable fscache for checkout again
137:  6d59d6350c = 137:  c610a55d68 Enable the filesystem cache (fscache) in refresh_index().
138:  e0c4eb3c97 = 138:  0a874ca4f7 fscache: use FindFirstFileExW to avoid retrieving the short name
139:  4232b4c2dc = 139:  fe4357fe11 status: disable and free fscache at the end of the status command
140:  f1600f38a7 = 140:  2d5d8a24c1 fscache: add GIT_TEST_FSCACHE support
141:  31dcfeb3d7 = 141:  38fd4433be fscache: add fscache hit statistics
142:  f8d96cad16 = 142:  25f91d9e20 mem_pool: add GIT_TRACE_MEMPOOL support
143:  7238952c1d = 143:  0917de8403 fscache: fscache takes an initial size
144:  ff7d11ef4d = 144:  7bedd0ca01 fscache: update fscache to be thread specific instead of global
145:  d70ee3e41f = 145:  a89254120b fscache: teach fscache to use mempool
146:  bbaa8359e9 = 146:  9487bf00ab fscache: make fscache_enable() thread safe
147:  f9f1c11e95 = 147:  37a65ba845 fscache: teach fscache to use NtQueryDirectoryFile
148:  1bc11737ba = 148:  f951763f2f unpack-trees: enable fscache for sparse-checkout
150:  9617e3c2b6 = 149:  54530763d5 git-gui: provide question helper for retry fallback on Windows
149:  51589d85f3 = 150:  3f94c738da fscache: remember the reparse tag for each entry
152:  193baf6b34 = 151:  b4bc4eff46 git gui: set GIT_ASKPASS=git-gui--askpass if not set yet
151:  4dca0a27d2 = 152:  7bd5aa8993 fscache: implement an FSCache-aware is_mount_point()
155:  dd06904fac = 153:  b48394f2a6 git-gui--askyesno: fix funny text wrapping
153:  7d3576024b = 154:  8d7545cf62 clean: make use of FSCache
154:  02f6ae809a = 155:  34ea8b01d3 gitk: Unicode file name support
156:  a2cadcbaa9 = 156:  be7dc96bb6 gitk: Use an external icon file on Windows
157:  4d0a0a7e89 = 157:  c9d175e085 git-gui--askyesno: allow overriding the window title
158:  adf1d8989d = 158:  7617fa2949 gitk: fix arrow keys in input fields with Tcl/Tk >= 8.6
159:  8c02cbbd53 = 159:  d3c16304cd git-gui--askyesno (mingw): use Git for Windows' icon, if available
160:  1f75d110f9 = 160:  57328103b8 gitk: make the "list references" default window width wider
161:  6d57a51101 = 161:  2849ef1319 pack-objects (mingw): demonstrate a segmentation fault with large deltas
162:  beca37c4a5 = 162:  80642fb8fb mingw: support long paths
163:  c60f116c94 = 163:  56f5f62b94 Win32: fix 'lstat("dir/")' with long paths
164:  367b7ac50f = 164:  e043372424 win32(long path support): leave drive-less absolute paths intact
175:  c92990f2d9 = 165:  87b3108cf9 compat/fsmonitor/fsm-*-win32: support long paths
176:  cf1ad67a6e = 166:  d306f3a179 clean: suggest using `core.longPaths` if paths are too long to remove
165:  9c15e7bae0 = 167:  552d0dafdb mingw: Support `git_terminal_prompt` with more terminals
166:  96f7208c6a = 168:  6312ee2a0e compat/terminal.c: only use the Windows console if bash 'read -r' fails
167:  cd8d6b64bb = 169:  cdad4e29ac mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
168:  e53d02649f = 170:  5cdbf0cc73 Unbreak interactive GPG prompt upon signing
169:  6b3d624f71 = 171:  dc5402fa2b strbuf_readlink: don't call readlink twice if hint is the exact link size
170:  9407e2321d = 172:  63115d6f60 strbuf_readlink: support link targets that exceed PATH_MAX
171:  0bd7c2106d = 173:  080a596492 lockfile.c: use is_dir_sep() instead of hardcoded '/' checks
172:  9f3d0bdb98 = 174:  1b58fba0a2 Win32: don't call GetFileAttributes twice in mingw_lstat()
173:  4dbf380ac6 = 175:  17813d076a Win32: implement stat() with symlink support
174:  4d4e5723aa = 176:  30e5c58db4 Win32: remove separate do_lstat() function
177:  be743cb018 = 177:  c117e9a3a5 Win32: let mingw_lstat() error early upon problems with reparse points
178:  a151692ce4 = 178:  693248939d mingw: teach fscache and dirent about symlinks
179:  3b8188dd6c = 179:  f5e21caa5d Win32: lstat(): return adequate stat.st_size for symlinks
180:  f4a926ea63 = 180:  03a474ab11 Win32: factor out retry logic
181:  8a49696e2b = 181:  6069a7749c Win32: change default of 'core.symlinks' to false
182:  770dbc3d8f = 182:  5de35106f5 Win32: add symlink-specific error codes
183:  3e8d84755a = 183:  0fde044091 Win32: mingw_unlink: support symlinks to directories
184:  c9180fee09 = 184:  ec3fe17b27 Win32: mingw_rename: support renaming symlinks
185:  d02b98970c = 185:  ae603000be Win32: mingw_chdir: change to symlink-resolved directory
186:  25aa677034 = 186:  fbc2318649 Win32: implement readlink()
187:  632f530561 = 187:  a1647d3936 mingw: lstat: compute correct size for symlinks
188:  87d8912954 = 188:  a8936e2dee Win32: implement basic symlink() functionality (file symlinks only)
189:  6201b76029 = 189:  ceaa4d1976 Win32: symlink: add support for symlinks to directories
190:  a12ceba702 = 190:  7cb4604653 mingw: try to create symlinks without elevated permissions
191:  387565c722 = 191:  c8851a0f20 mingw: emulate stat() a little more faithfully
192:  be9303ff30 = 192:  4f30f2ed79 mingw: special-case index entries for symlinks with buggy size
198:  0ef2f1c8b7 = 193:  3b47c9830d mingw: introduce code to detect whether we're inside a Windows container
200:  3c951359da = 194:  1559d2666d mingw: when running in a Windows container, try to rename() harder
202:  8d5869b12f = 195:  61ad3a4f9d mingw: move the file_attr_to_st_mode() function definition
204:  c9aee6de54 = 196:  702eceef16 mingw: Windows Docker volumes are *not* symbolic links
193:  22a3d60e4a = 197:  5c3798339d Win32: symlink: move phantom symlink creation to a separate function
206:  4b071ed7f0 = 198:  b31125b0ac mingw: work around rename() failing on a read-only file
194:  4ee0b3120a = 199:  cbb4ce164f Introduce helper to create symlinks that knows about index_state
195:  7fe10567bc = 200:  88a421b62d mingw: allow to specify the symlink type in .gitattributes
196:  bc5aecf188 = 201:  b23c4b38f2 Win32: symlink: add test for `symlink` attribute
197:  90af1a4d41 = 202:  d2f48fd5f1 mingw: explicitly specify with which cmd to prefix the cmdline
199:  e3ec150963 = 203:  88e6244b5d mingw: when path_lookup() failed, try BusyBox
201:  d95a157067 = 204:  b49d9d40a5 test-lib: avoid unnecessary Perl invocation
203:  3d2d68af2a = 205:  8b642e59c0 test-tool: learn to act as a drop-in replacement for `iconv`
205:  4651b3d711 = 206:  9121ebabcc tests(mingw): if `iconv` is unavailable, use `test-helper --iconv`
207:  168b479003 = 207:  837b6ceefb gitattributes: mark .png files as binary
208:  c4b6184daf = 208:  1789943368 tests: move test PNGs into t/lib-diff/
209:  b5b33c1dfa = 209:  7843106125 tests: only override sort & find if there are usable ones in /usr/bin/
210:  c3bfaf3ad7 = 210:  07ce2ad402 tests: use the correct path separator with BusyBox
211:  186f9ff765 = 211:  d71848c722 mingw: only use Bash-ism `builtin pwd -W` when available
212:  71e686134c = 212:  06e0e9b89c tests (mingw): remove Bash-specific pwd option
213:  9d6c96faa9 = 213:  25fc8ad2c8 test-lib: add BUSYBOX prerequisite
214:  80d33b614e = 214:  d7322e71c1 t5003: use binary file from t/lib-diff/
215:  ab5b9d1934 = 215:  e5f7adff65 t5532: workaround for BusyBox on Windows
216:  3c059e3945 = 216:  091b776d80 t5605: special-case hardlink test for BusyBox-w32
217:  c5aa28a7dd = 217:  ea120cfed9 t5813: allow for $PWD to be a Windows path
218:  569f680c66 = 218:  7b8eab1e86 t9200: skip tests when $PWD contains a colon
219:  b98ca57c89 = 219:  5fbed395ce mingw: add a Makefile target to copy test artifacts
222:  6240365447 ! 220:  aa5019f7ec mingw: optionally enable wsl compability file mode bits
    @@ Commit message
     
      ## Documentation/config/core.txt ##
     @@ Documentation/config/core.txt: core.maxTreeDepth::
    - 	tree (e.g., "a/b/cde/f" has a depth of 4). This is a fail-safe
      	to allow Git to abort cleanly, and should not generally need to
    - 	be adjusted. The default is 4096.
    + 	be adjusted. When Git is compiled with MSVC, the default is 512.
    + 	Otherwise, the default is 2048.
     +
     +core.WSLCompat::
     +	Tells Git whether to enable wsl compatibility mode.
220:  9d056fab1d = 221:  2f891bebfc mingw: kill child processes in a gentler way
221:  372373f2eb = 222:  6327982483 mingw: do not call xutftowcs_path in mingw_mktemp
223:  c769b844b0 = 223:  d2291bf2e2 mingw: really handle SIGINT
224:  0bb4736eac = 224:  9c5e8359df Partially un-revert "editor: save and reset terminal after calling EDITOR"
225:  af7fa6b46e = 225:  66b89bd55c Describe Git for Windows' architecture [no ci]
226:  b7d7731e1b = 226:  994f2e89e5 Modify the Code of Conduct for Git for Windows
227:  d09e406c12 = 227:  e87883f6f6 CONTRIBUTING.md: add guide for first-time contributors
228:  b4e02b9e54 = 228:  bc479e8fa0 README.md: Add a Windows-specific preamble
232:  323134eefb = 229:  22dc99b83a Add a GitHub workflow to monitor component updates
229:  4b7e1f981a = 230:  1baedc500d Add an issue template
234:  a49b20972d = 231:  cca62250ae reset: reinstate support for the deprecated --stdin option
235:  8d0b6ccfb9 = 232:  6d8fad105c fsmonitor: reintroduce core.useBuiltinFSMonitor
236:  07fc80046a = 233:  46df015031 dependabot: help keeping GitHub Actions versions up to date
230:  01f7a13a8a = 234:  802ee53b52 Modify the GitHub Pull Request template (to reflect Git for Windows)
231:  4890b6347d = 235:  b56af95fee .github: Add configuration for the Sentiment Bot
233:  5a292d556d = 236:  2053110151 Document how $HOME is set on Windows
237:  7c314ef348 = 237:  320b50fbb0 SECURITY.md: document Git for Windows' policies
238:  ca7b9f1e39 <   -:  ---------- fixup! run-command: be helpful with Git LFS fails on Windows 7

dscho and others added 30 commits July 18, 2024 13:34
Since ef8a6c6 (reftable: utility functions, 2021-10-07) we not only
have a libreftable, but also a libreftable_test.

Signed-off-by: Johannes Schindelin <[email protected]>
Visual Studio 2022 does not like that at all.

Signed-off-by: Johannes Schindelin <[email protected]>
These refactorings are really gifts that keep on giving.

Signed-off-by: Johannes Schindelin <[email protected]>
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 <[email protected]>
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 <[email protected]>
Signed-off-by: 孙卓识 <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
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 <[email protected]>
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 <[email protected]>
... 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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
We haven't used this feature in ages, we don't actually need to.

Signed-off-by: Johannes Schindelin <[email protected]>
…imal-sdk

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

Signed-off-by: Johannes Schindelin <[email protected]>
These many refactorings in Git sure are gifts that keep on giving.

Signed-off-by: Johannes Schindelin <[email protected]>
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 <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
When running Git for Windows on a remote APFS filesystem, it would
appear that the `mingw_open_append()`/`write()` combination would fail
almost exactly like on some CIFS-mounted shares as had been reported in
git-for-windows#2753, albeit with a
different `errno` value.

Let's handle that `errno` value just the same, by suggesting to set
`windows.appendAtomically=false`.

Signed-off-by: David Lomas <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
Windows 10 version 1511 (also known as Anniversary Update), according to
https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences
introduced native support for ANSI sequence processing. This allows
using colors from the entire 24-bit color range.

All we need to do is test whether the console's "virtual processing
support" can be enabled. If it can, we do not even need to start the
`console_thread` to handle ANSI sequences.

Or, almost all we need to do: When `console_thread()` does its work, it
uses the Unicode-aware `write_console()` function to write to the Win32
Console, which supports Git for Windows' implicit convention that all
text that is written is encoded in UTF-8. The same is not necessarily
true if native ANSI sequence processing is used, as the output is then
subject to the current code page. Let's ensure that the code page is set
to `CP_UTF8` as long as Git writes to it.

Signed-off-by: Johannes Schindelin <[email protected]>
winuser.h contains the definition of RT_MANIFEST that our LLVM based
toolchain needs to understand that we want to embed
compat/win32/git.manifest as an application manifest. It currently just
embeds it as additional data that Windows doesn't understand.

This also helps our GCC based toolchain understand that we only want one
copy embedded. It currently embeds one working assembly manifest and one
nearly identical, but useless copy as additional data.

This also teaches our Visual Studio based buildsystems to pick up the
manifest file from git.rc. This means we don't have to explicitly specify
it in contrib/buildsystems/Generators/Vcxproj.pm anymore. Slightly
counter-intuitively this also means we have to explicitly tell Cmake
not to embed a default manifest.

This fixes git-for-windows#4707

Signed-off-by: Matthias Aßhauer <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
alejandro5042 and others added 20 commits July 18, 2024 13:49
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 <[email protected]>
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 <[email protected]>
This is the recommended way on GitHub to describe policies revolving around
security issues and about supported versions.

Signed-off-by: Johannes Schindelin <[email protected]>
…dvice

clean: suggest using `core.longPaths` if paths are too long to remove
Signed-off-by: Johannes Schindelin <[email protected]>
This was pull request git-for-windows#1645 from ZCube/master

Support windows container.

Signed-off-by: Johannes Schindelin <[email protected]>
…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 <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
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 <[email protected]>
Handle Ctrl+C in Git Bash nicely

Signed-off-by: Johannes Schindelin <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
…updates

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

Signed-off-by: Johannes Schindelin <[email protected]>
@mjcheetham mjcheetham requested a review from dscho July 18, 2024 21:03
Copy link
Member

@dscho dscho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@mjcheetham mjcheetham added this to the Next release milestone Jul 18, 2024
@mjcheetham
Copy link
Member Author

mjcheetham commented Jul 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 linked an issue Jul 18, 2024 that may be closed by this pull request
@mjcheetham
Copy link
Member Author

mjcheetham commented Jul 18, 2024

/git-artifacts

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

@mjcheetham
Copy link
Member Author

mjcheetham commented Jul 18, 2024

/release

The release-git workflow run was started

@gitforwindowshelper gitforwindowshelper bot merged commit e94ef1d into git-for-windows:main Jul 18, 2024
65 of 66 checks passed
@mjcheetham mjcheetham deleted the rebase-to-v2.46.0-rc1 branch July 18, 2024 22:17
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.0-rc1