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.45.0-rc0 #4918

Merged
merged 968 commits into from
Apr 19, 2024

Conversation

dscho
Copy link
Member

@dscho dscho commented Apr 19, 2024

Range-diff relative to the main branch
  • 1: f6d07da = 1: b36e8ff gitk(Windows): avoid inadvertently calling executables in the worktree

  • 2: ffa8b59 = 2: c669022 t9350: point out that refs are not updated correctly

  • 3: 1569727 = 3: 7c8e75a transport-helper: add trailing --

  • 4: b5975da = 4: 4c1ad66 remote-helper: check helper status after import/export

  • 6: 7e1ee54 = 5: 78579c1 mingw: demonstrate a problem with certain absolute paths

  • 7: 91929b0 = 6: 2bb763c clean: do not traverse mount points

  • 5: 52ee51f = 7: 29e5abe Always auto-gc after calling a fast-import transport

  • 8: 6d7e635 = 8: 10798da mingw: allow absolute paths without drive prefix

  • 9: e1c57f4 = 9: b7cfef5 clean: remove mount points when possible

  • 10: 0b807dc ! 10: 24327bd mingw: include the Python parts in the build

    @@ config.mak.uname: ifeq ($(uname_S),MINGW)
      	USE_LIBPCRE = YesPlease
      	USE_NED_ALLOCATOR = YesPlease
     +	NO_PYTHON =
    - 	ifeq (/mingw64,$(subst 32,64,$(prefix)))
    +         ifeq (/mingw64,$(subst 32,64,$(prefix)))
      		# Move system config into top-level /etc/
      		ETC_GITCONFIG = ../etc/gitconfig
  • 11: 746b42f = 11: 01500b2 win32/pthread: avoid name clashes with winpthread

  • 12: 7e92bf4 = 12: deedbc3 git-compat-util: avoid redeclaring _DEFAULT_SOURCE

  • 13: 4410e83 = 13: e6a93f7 Import the source code of mimalloc v2.1.2

  • 14: b869a33 = 14: da663e2 mimalloc: adjust for building inside Git

  • 15: e90dea5 = 15: ad8a7c7 mimalloc: offer a build-time option to enable it

  • 16: 0b3b763 = 16: fe9fe61 mimalloc: use "weak" random seed when statically linked

  • 17: e6cd8f2 ! 17: 6e53927 mingw: use mimalloc

    @@ config.mak.uname: ifeq ($(uname_S),MINGW)
     -	USE_NED_ALLOCATOR = YesPlease
     +	USE_MIMALLOC = YesPlease
      	NO_PYTHON =
    - 	ifeq (/mingw64,$(subst 32,64,$(prefix)))
    +         ifeq (/mingw64,$(subst 32,64,$(prefix)))
      		# Move system config into top-level /etc/
  • 18: bc841ff = 18: 2caadc6 transport: optionally disable side-band-64k

  • 20: 28d0568 = 19: 0f580d5 mingw: demonstrate a git add issue with NTFS junctions

  • 22: 3affab3 = 20: 9c51bc7 mingw: ensure valid CTYPE

  • 21: cf25607 = 21: 039d693 strbuf_realpath(): use platform-dependent API if available

  • 29: 78aca51 ! 22: 579665e mingw: allow git.exe to be used instead of the "Git wrapper"

    @@ config.mak.uname: endif
      	# invalidcontinue.obj allows Git's source code to close the same file
      	# handle twice, or to access the osfhandle of an already-closed stdout
     @@ config.mak.uname: ifeq ($(uname_S),MINGW)
    - 	endif
    +         endif
      	CC = gcc
      	COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO=0 -DDETECT_MSYS_TTY \
     -		-fstack-protector-strong
  • 19: 4e2e131 = 23: b9114da mingw: make sure errno is set correctly when socket operations fail

  • 23: 0b77572 = 24: 7ee5826 mingw: do resolve symlinks in getcwd()

  • 24: f3151fe = 25: 87dc336 mingw: fix fatal error working on mapped network drives on Windows

  • 25: af5f503 = 26: e4b4a48 clink.pl: fix MSVC compile script to handle libcurl-d.lib

  • 26: d4d3aee = 27: e60c6ad mingw: implement a platform-specific strbuf_realpath()

  • 27: ac698b8 = 28: 5e279bf vcxproj: unclash project directories with build outputs

  • 28: 80e60bb = 29: d711e01 t5505/t5516: allow running without .git/branches/ in the templates

  • 30: bb2ec50 = 30: 5ede373 t5505/t5516: fix white-space around redirectors

  • 31: 9e5e830 = 31: f23d634 mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory

  • 32: 39f0b43 = 32: f13bfd0 http: use new "best effort" strategy for Secure Channel revoke checking

  • 33: a70f3ef = 33: cdef7d3 t3701: verify that we can add lots of files interactively

  • 34: 850ae56 = 34: a2e45f6 git add -i: handle CR/LF line endings in the interactive input

  • 35: 4ffb4f7 ! 35: 040fdf8 commit: accept "scissors" with CR/LF line endings

    @@ wt-status.c: static void wt_longstatus_print_other(struct wt_status *s,
      	const char *p;
      	struct strbuf pattern = STRBUF_INIT;
      
    - 	strbuf_addf(&pattern, "\n%c %s", comment_line_char, cut_line);
    + 	strbuf_addf(&pattern, "\n%s %s", comment_line_str, cut_line);
     -	if (starts_with(s, pattern.buf + 1))
     +	if (starts_with(s, pattern.buf + 1) &&
     +	    starts_with_newline(s + pattern.len - 1))
      		len = 0;
    --	else if ((p = strstr(s, pattern.buf)))
    +-	else if ((p = strstr(s, pattern.buf))) {
     +	else if ((p = strstr(s, pattern.buf)) &&
    -+		 starts_with_newline(p + pattern.len))
    - 		len = p - s + 1;
    - 	strbuf_release(&pattern);
    - 	return len;
    ++		 starts_with_newline(p + pattern.len)) {
    + 		size_t newlen = p - s + 1;
    + 		if (newlen < len)
    + 			len = newlen;
  • 38: 1477241 = 36: cf5ed4c clink.pl: fix libexpatd.lib link error when using MSVC

  • 39: 48af27c = 37: 3b1f342 Makefile: clean up .ilk files when MSVC=1

  • 40: 8d38caa = 38: e75e3f8 vcbuild: add support for compiling Windows resource files

  • 41: f56cd80 = 39: 5300408 config.mak.uname: add git.rc to MSVC builds

  • 36: 449a729 = 40: 8e62279 t0014: fix indentation

  • 37: edd04e4 = 41: 5587355 git-gui: accommodate for intent-to-add files

  • 45: 7df2091 = 42: f9f45bd vcpkg_install: detect lack of Git

  • 42: db752ae = 43: a22e73e clink.pl: ignore no-stack-protector arg on MSVC=1 builds

  • 47: 56cb4d2 = 44: fb3a367 vcpkg_install: add comment regarding slow network connections

  • 43: bacc877 = 45: dc3d037 clink.pl: move default linker options for MSVC=1 builds

  • 49: bec86b4 = 46: 4399b5c vcxproj: support building Windows/ARM64 binaries

  • 44: 701b3eb = 47: c3b273f buildsystems: remove duplicate clause

  • 51: 6b27288 = 48: 309ddfb vcbuild: install ARM64 dependencies when building ARM64 binaries

  • 46: 7aff82b = 49: 2a69b4a vcxproj: handle resource files, too

  • 53: 699ecb3 = 50: d3f01b5 vcbuild: add an option to install individual 'features'

  • 48: 7ff808c = 51: 8490708 vcxproj: ignore -fno-stack-protector and -fno-common

  • 54: 2f6bc68 = 52: 4435b16 cmake: allow building for Windows/ARM64

  • 50: 3296421 = 53: 33d9a68 vcxproj: handle GUI programs, too

  • 55: 417ce96 = 54: 4c3acea ci(vs-build) also build Windows/ARM64 artifacts

  • 52: d044e20 = 55: ac6ad16 cmake: install headless-git.

  • 56: 7d53f99 = 56: 50a4981 Add schannel to curl installation

  • 57: c0576d3 = 57: d82df6e cmake(): allow setting HOST_CPU for cross-compilation

  • 61: 1d76420 = 58: d520750 CMake: default Visual Studio generator has changed

  • 60: 673a33e = 59: 982a6e8 subtree: update contrib/subtree test target

  • 65: 6cafcba = 60: c61873e .gitignore: add Visual Studio CMakeSetting.json file

  • 58: 5b54031 = 61: f0bfafe ci(vs-build): download the vcpkg artifacts using a dedicated Action

  • 59: aee8fa8 = 62: 8e305e7 mingw: allow for longer paths in parse_interpreter()

  • 62: f3f8c5a = 63: ba8efe8 compat/vcbuild: document preferred way to build in Visual Studio

  • 63: 3696462 = 64: 82d199a http: optionally send SSL client certificate

  • 64: cd537f5 = 65: 297ea2b ci: run contrib/subtree tests in CI builds

  • 66: a42f7c5 = 66: b6c1cb7 hash-object: demonstrate a >4GB/LLP64 problem

  • 67: bf410ee = 67: cf2b0fa CMakeLists: add default "x64-windows" arch for Visual Studio

  • 68: cf231ef ! 68: 4c2d8bd write_object_file_literally(): use size_t

    @@ object-file.c: static void write_object_file_prepare(const struct git_hash_algo
      				      char *hdr, int *hdrlen)
      {
     @@ object-file.c: int write_object_file_flags(const void *buf, unsigned long len,
    - 	return write_loose_object(oid, hdr, hdrlen, buf, len, 0, flags);
    + 	return 0;
      }
      
     -int write_object_file_literally(const void *buf, unsigned long len,
    @@ object-file.c: int write_object_file_flags(const void *buf, unsigned long len,
     
      ## object-store-ll.h ##
     @@ object-store-ll.h: static inline int write_object_file(const void *buf, unsigned long len,
    - 	return write_object_file_flags(buf, len, type, oid, 0);
    + 	return write_object_file_flags(buf, len, type, oid, NULL, 0);
      }
      
     -int write_object_file_literally(const void *buf, unsigned long len,
  • 69: d3c63da = 69: ce46c34 CMake: show Win32 and Generator_platform build-option values

  • 70: 143b4ea = 70: f64380f init: do parse all core.* settings early

  • 71: 272cf41 = 71: 654f815 Enable the built-in FSMonitor as an experimental feature

  • 72: 0620f84 ! 72: d349f6e object-file.c: use size_t for header lengths

    @@ object-file.c: int stream_loose_object(struct input_stream *in_stream, size_t le
     -int write_object_file_flags(const void *buf, unsigned long len,
     +int write_object_file_flags(const void *buf, size_t len,
      			    enum object_type type, struct object_id *oid,
    - 			    unsigned flags)
    + 			    struct object_id *compat_oid_in, unsigned flags)
      {
    +@@ object-file.c: int write_object_file_flags(const void *buf, unsigned long len,
    + 	const struct git_hash_algo *compat = repo->compat_hash_algo;
    + 	struct object_id compat_oid;
      	char hdr[MAX_HEADER_LEN];
     -	int hdrlen = sizeof(hdr);
     +	size_t hdrlen = sizeof(hdr);
      
    - 	/* Normally if we have it in the pack then we do not bother writing
    - 	 * it out into .git/objects/??/?{38} file.
    + 	/* Generate compat_oid */
    + 	if (compat) {
     @@ object-file.c: int write_object_file_literally(const void *buf, size_t len,
    - 				unsigned flags)
    - {
    - 	char *header;
    + 	const struct git_hash_algo *algo = repo->hash_algo;
    + 	const struct git_hash_algo *compat = repo->compat_hash_algo;
    + 	struct object_id compat_oid;
     -	int hdrlen, status = 0;
    +-	int compat_type = -1;
     +	size_t hdrlen;
    -+	int status = 0;
    ++	int status = 0, compat_type = -1;
      
    - 	/* type string, SP, %lu of the length plus NUL must fit this */
    - 	hdrlen = strlen(type) + MAX_HEADER_LEN;
    + 	if (compat) {
    + 		compat_type = type_from_string_gently(type, -1, 1);
     
      ## object-store-ll.h ##
     @@ object-store-ll.h: void *repo_read_object_file(struct repository *r,
    @@ object-store-ll.h: void *repo_read_object_file(struct repository *r,
     -int write_object_file_flags(const void *buf, unsigned long len,
     +int write_object_file_flags(const void *buf, size_t len,
      			    enum object_type type, struct object_id *oid,
    - 			    unsigned flags);
    + 			    struct object_id *comapt_oid_in, unsigned flags);
      static inline int write_object_file(const void *buf, unsigned long len,
  • 73: a70bcde = 73: 71d6280 hash algorithms: use size_t for section lengths

  • 74: ced7957 = 74: 96d834e hash-object --stdin: verify that it works with >4GB/LLP64

  • 75: dc8fdb5 = 75: 81df807 hash-object: add another >4GB/LLP64 test case

  • 77: 9f3a1f5 = 76: bbcf639 hash-object: add a >4GB/LLP64 test case using filtered input

  • 76: 1c37c54 = 77: 133293a setup: properly use "%(prefix)/" when in WSL

  • 81: 15c43f8 = 78: 090c53a Add config option windows.appendAtomically

  • 80: ac28795 = 79: 03bda43 vcxproj: allow building with NO_PERL again

  • 78: 8ffd41b = 80: d95121d compat/mingw.c: do not warn when failing to get owner

  • 79: 3c712e4 = 81: 68365c8 mingw: $env:TERM="xterm-256color" for newer OSes

  • 83: a96099c = 82: e37795c winansi: check result and Buffer before using Name

  • 84: 7135f7f = 83: 7109895 mingw: change core.fsyncObjectFiles = 1 by default

  • 82: e3242a9 = 84: eac9029 vcxproj: require C11

  • 85: 66b781b = 85: a58f348 vcxproj: ignore the -pedantic option

  • 86: 4c025b1 = 86: 7512867 vcxproj: include reftable when committing .vcxproj files

  • 87: 6518161 = 87: c4aee32 vcxproj: handle libreftable_test, too

  • 88: e3f119d = 88: d9e3da1 vcxproj: avoid escaping double quotes in the defines

  • 89: 712174e = 89: c3ac1ea ci: adjust Azure Pipeline for runs_on_pool

  • 90: 755e24a = 90: d17cf05 ci: stop linking the prove cache

  • 91: 84cf485 = 91: 74135f1 ci: reinstate Azure Pipelines support

  • 92: c6b8b60 = 92: 20d8776 azure-pipeline: drop the GETTEXT_POISON job

  • 93: 9c6adc8 = 93: 9465edc azure-pipeline: stop hard-coding apt-get calls

  • 94: fbe4ef8 = 94: 4ea1239 azure-pipeline: drop the code to write to/read from a file share

  • 95: 81cb4e3 = 95: c2c2036 azure-pipeline: use partial clone/parallel checkout to initialize minimal-sdk

  • 96: b5bb224 = 96: c6b7715 azure-pipeline: downcase the job name of the Linux32 job

  • 100: f7d5f33 = 97: 564895e azure-pipeline: run static-analysis on jammy

  • 97: ace479f = 98: 33d04e0 bswap.h: add support for built-in bswap functions

  • 98: effc5a9 = 99: 1e733a7 MinGW: link as terminal server aware

  • 101: 980bdc2 = 100: 885d8df Fix Windows version resources

  • 99: 1bd5125 ! 101: 84a130e config.mak.uname: add support for clangarm64

    @@ config.mak.uname: ifeq ($(uname_S),MINGW)
      		prefix = /mingw64
      		HOST_CPU = x86_64
      		BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup
    -+	else ifeq (CLANGARM64,$(MSYSTEM))
    ++        else ifeq (CLANGARM64,$(MSYSTEM))
     +		prefix = /clangarm64
     +		HOST_CPU = aarch64
     +		BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup
    - 	else
    +         else
      		COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
      		BASIC_LDFLAGS += -Wl,--large-address-aware
  • 105: f86f976 = 102: f508e2d ci: create clangarm64-build.yml

  • 106: 3c04c1b = 103: 6453bc2 status: fix for old-style submodules with commondir

  • 107: cd182d8 = 104: 7a3cd82 windows: skip linking git-<command> for built-ins

  • 108: a806007 = 105: 16dbaef windows: fix Repository>Explore Working Copy

  • 102: a2ba280 ! 106: f3a6dfa http: optionally load libcurl lazily

    @@ Makefile: include shared.mak
      # Define USE_LIBPCRE if you have and want to use libpcre. Various
     @@ Makefile: else
      		CURL_LIBCURL =
    - 	endif
    +         endif
      
    --	ifndef CURL_LDFLAGS
    +-        ifndef CURL_LDFLAGS
     -		CURL_LDFLAGS = $(eval CURL_LDFLAGS := $$(shell $$(CURL_CONFIG) --libs))$(CURL_LDFLAGS)
    -+	ifdef LAZYLOAD_LIBCURL
    ++        ifdef LAZYLOAD_LIBCURL
     +		LAZYLOAD_LIBCURL_OBJ = compat/lazyload-curl.o
     +		OBJECTS += $(LAZYLOAD_LIBCURL_OBJ)
     +		# The `CURL_STATICLIB` constant must be defined to avoid seeing the functions
     +		# declared as DLL imports
     +		CURL_CFLAGS = -DCURL_STATICLIB
     +		CURL_LIBCURL = -ldl
    -+	else
    -+		ifndef CURL_LDFLAGS
    ++        else
    ++                ifndef CURL_LDFLAGS
     +			CURL_LDFLAGS = $(eval CURL_LDFLAGS := $$(shell $$(CURL_CONFIG) --libs))$(CURL_LDFLAGS)
    -+		endif
    ++                endif
     +		CURL_LIBCURL += $(CURL_LDFLAGS)
    - 	endif
    +         endif
     -	CURL_LIBCURL += $(CURL_LDFLAGS)
      
    - 	ifndef CURL_CFLAGS
    +         ifndef CURL_CFLAGS
      		CURL_CFLAGS = $(eval CURL_CFLAGS := $$(shell $$(CURL_CONFIG) --cflags))$(CURL_CFLAGS)
     @@ Makefile: else
    - 	endif
    - 	ifdef USE_CURL_FOR_IMAP_SEND
    +         endif
    +         ifdef USE_CURL_FOR_IMAP_SEND
      		BASIC_CFLAGS += -DUSE_CURL_FOR_IMAP_SEND
     -		IMAP_SEND_BUILDDEPS = http.o
     +		IMAP_SEND_BUILDDEPS = http.o $(LAZYLOAD_LIBCURL_OBJ)
      		IMAP_SEND_LDFLAGS += $(CURL_LIBCURL)
    - 	endif
    - 	ifndef NO_EXPAT
    +         endif
    +         ifndef NO_EXPAT
     @@ Makefile: git-imap-send$X: imap-send.o $(IMAP_SEND_BUILDDEPS) GIT-LDFLAGS $(GITLIBS)
      	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
      		$(IMAP_SEND_LDFLAGS) $(LIBS)
  • 103: 3aa6dc3 ! 107: 9e18dc8 http: support lazy-loading libcurl also on Windows

    @@ Makefile: else
      		CURL_LIBCURL = -ldl
     +endif
     +endif
    - 	else
    - 		ifndef CURL_LDFLAGS
    +         else
    +                 ifndef CURL_LDFLAGS
      			CURL_LDFLAGS = $(eval CURL_LDFLAGS := $$(shell $$(CURL_CONFIG) --libs))$(CURL_LDFLAGS)
     
      ## compat/lazyload-curl.c ##
  • 104: 089b1ef = 108: 95ca254 http: when loading libcurl lazily, allow for multiple SSL backends

  • 109: 11cee6c = 109: bd0d1ec mingw: do load libcurl dynamically by default

  • 110: 807aed5 = 110: ae7a711 Add a GitHub workflow to verify that Git/Scalar work in Nano Server

  • 111: f2bac6e = 111: 5e65639 mingw: suggest windows.appendAtomically in more cases

  • 112: 4d19bae = 112: abe7f60 win32: use native ANSI sequence processing, if possible

  • 113: b222864 = 113: 5e0a0a9 git.rc: include winuser.h

  • 114: f45cdb8 = 114: d4beff3 build(deps): bump microsoft/setup-msbuild from 1 to 2

  • 236: ff86989 = 115: 7cbfd9b common-main.c: fflush stdout buffer upon exit

  • 115: 72efe1a = 116: c3096f8 Win32: make FILETIME conversion functions public

  • 116: 2e5d520 = 117: bd44760 Win32: dirent.c: Move opendir down

  • 117: 8c981f7 = 118: c496f8c mingw: make the dirent implementation pluggable

  • 118: a5f5f3d = 119: 3fd177e Win32: make the lstat implementation pluggable

  • 119: 4b7ab84 = 120: 299c9e1 mingw: add infrastructure for read-only file system level caches

  • 120: bb69605 = 121: 2033390 mingw: add a cache below mingw's lstat and dirent implementations

  • 121: 3d96e1c = 122: 68292d6 fscache: load directories only once

  • 122: 17adee1 = 123: 6965143 fscache: add key for GIT_TRACE_FSCACHE

  • 123: 528ada5 = 124: 68d6f6f fscache: remember not-found directories

  • 124: f5fe405 = 125: e3968f3 fscache: add a test for the dir-not-found optimization

  • 125: cc63eb4 ! 126: 1c26df8 add: use preload-index and fscache for performance

    @@ builtin/add.c: int cmd_add(int argc, const char **argv, const char *prefix)
      		int baselen;
      
     @@ builtin/add.c: int cmd_add(int argc, const char **argv, const char *prefix)
    - 
    + 	free(ps_matched);
      	dir_clear(&dir);
      	clear_pathspec(&pathspec);
     +	enable_fscache(0);
  • 126: edbeaf8 = 127: 01ed91d dir.c: make add_excludes aware of fscache during status

  • 127: 49daea6 = 128: 52257fd fscache: make fscache_enabled() public

  • 128: 52e5aef = 129: 720f37d dir.c: regression fix for add_excludes with fscache

  • 129: 4d934d6 = 130: 89dbf02 fetch-pack.c: enable fscache for stats under .git/objects

  • 130: a936cbc = 131: b8a098a checkout.c: enable fscache for checkout again

  • 131: 31a3dba = 132: 855b39d Enable the filesystem cache (fscache) in refresh_index().

  • 132: 5114996 = 133: 3ae45a4 fscache: use FindFirstFileExW to avoid retrieving the short name

  • 133: a3cdefd = 134: 62b2723 status: disable and free fscache at the end of the status command

  • 134: fa145d7 = 135: 985ef47 fscache: add GIT_TEST_FSCACHE support

  • 135: c7b65bc = 136: ae292d2 fscache: add fscache hit statistics

  • 136: 13ded6c = 137: 2c5a9dc mem_pool: add GIT_TRACE_MEMPOOL support

  • 137: 1829c22 = 138: 0db7150 fscache: fscache takes an initial size

  • 138: 22ebe7e = 139: 5047b0f fscache: update fscache to be thread specific instead of global

  • 139: 263ee17 = 140: 67230d7 fscache: teach fscache to use mempool

  • 140: 133ac14 = 141: d1bdb7d fscache: make fscache_enable() thread safe

  • 145: 7816d55 = 142: 79f7d58 git-gui: provide question helper for retry fallback on Windows

  • 141: 35d4265 = 143: 31126e6 fscache: teach fscache to use NtQueryDirectoryFile

  • 147: 4bb2790 = 144: 1448215 git gui: set GIT_ASKPASS=git-gui--askpass if not set yet

  • 142: 2dbee49 = 145: 879f92f unpack-trees: enable fscache for sparse-checkout

  • 148: fc248d7 = 146: 93b67dd git-gui--askyesno: fix funny text wrapping

  • 143: 0194798 = 147: 02e9b0b fscache: remember the reparse tag for each entry

  • 150: a9ffbc7 = 148: 31cbe1c git-gui--askyesno: allow overriding the window title

  • 144: dd36249 = 149: d5e9ffb fscache: implement an FSCache-aware is_mount_point()

  • 152: b451ae7 = 150: 56b8f2f git-gui--askyesno (mingw): use Git for Windows' icon, if available

  • 146: 8b551c8 = 151: 7b4337e clean: make use of FSCache

  • 149: e29f89a = 152: 19ef32a gitk: Unicode file name support

  • 151: 0e85f32 = 153: b132dec gitk: Use an external icon file on Windows

  • 153: 10ad832 = 154: 229161a gitk: fix arrow keys in input fields with Tcl/Tk >= 8.6

  • 154: fbd7e65 = 155: ceeabc8 gitk: make the "list references" default window width wider

  • 155: 52f6639 = 156: 02338f4 pack-objects (mingw): demonstrate a segmentation fault with large deltas

  • 156: fd5d72b = 157: 9b26060 mingw: support long paths

  • 157: 0681755 = 158: 79f4196 Win32: fix 'lstat("dir/")' with long paths

  • 227: 309a94f = 159: 54e7523 Add a GitHub workflow to monitor component updates

  • 220: 64429a0 = 160: eb6c648 Describe Git for Windows' architecture [no ci]

  • 219: 3cdda27 = 161: ad1cbfd reset: reinstate support for the deprecated --stdin option

  • 229: 0d76ca2 ! 162: f6a5439 fsmonitor: reintroduce core.useBuiltinFSMonitor

    @@ Commit message
     
      ## Documentation/config/advice.txt ##
     @@ Documentation/config/advice.txt: advice.*::
    - 		Advice shown when a user tries to create a worktree from an
    - 		invalid reference, to instruct how to create a new unborn
    + 		Shown when the user tries to create a worktree from an
    + 		invalid reference, to tell the user how to create a new unborn
      		branch instead.
     +
     +	useCoreFSMonitorConfig::
    @@ Documentation/config/advice.txt: advice.*::
     
      ## advice.c ##
     @@ advice.c: static struct {
    - 	[ADVICE_SUBMODULE_ALTERNATE_ERROR_STRATEGY_DIE] = { "submoduleAlternateErrorStrategyDie" },
    + 	[ADVICE_SUBMODULE_MERGE_CONFLICT]               = { "submoduleMergeConflict" },
      	[ADVICE_SUGGEST_DETACHING_HEAD]			= { "suggestDetachingHead" },
      	[ADVICE_UPDATE_SPARSE_PATH]			= { "updateSparsePath" },
     +	[ADVICE_USE_CORE_FSMONITOR_CONFIG]		= { "useCoreFSMonitorConfig" },
    @@ advice.c: static struct {
     
      ## advice.h ##
     @@ advice.h: enum advice_type {
    - 	ADVICE_SUBMODULE_ALTERNATE_ERROR_STRATEGY_DIE,
    + 	ADVICE_SUBMODULE_MERGE_CONFLICT,
      	ADVICE_SUGGEST_DETACHING_HEAD,
      	ADVICE_UPDATE_SPARSE_PATH,
     +	ADVICE_USE_CORE_FSMONITOR_CONFIG,
  • 230: 30db82a = 163: a600b6d dependabot: help keeping GitHub Actions versions up to date

  • 221: a55dc03 = 164: 6d7d64f Modify the Code of Conduct for Git for Windows

  • 222: c6ad32d = 165: c614e41 CONTRIBUTING.md: add guide for first-time contributors

  • 223: 4c1cd14 = 166: e80f1de README.md: Add a Windows-specific preamble

  • 224: 3d2d684 = 167: 1aa016e Add an issue template

  • 225: d2bb9f8 = 168: 7a01dd7 Modify the GitHub Pull Request template (to reflect Git for Windows)

  • 226: c95f781 = 169: d97b990 .github: Add configuration for the Sentiment Bot

  • 228: 2c8c23b = 170: a3fffa8 Document how $HOME is set on Windows

  • 231: dd07134 = 171: c1308f9 SECURITY.md: document Git for Windows' policies

  • 158: 1db54b0 ! 172: b51cd41 win32(long path support): leave drive-less absolute paths intact

    @@ Commit message
         Signed-off-by: Johannes Schindelin <[email protected]>
     
      ## compat/mingw.c ##
    +@@ compat/mingw.c: int mingw_core_config(const char *var, const char *value,
    + 	return 0;
    + }
    + 
    ++static inline int is_wdir_sep(wchar_t wchar)
    ++{
    ++	return wchar == L'/' || wchar == L'\\';
    ++}
    ++
    + /* Normalizes NT paths as returned by some low-level APIs. */
    + static wchar_t *normalize_ntpath(wchar_t *wbuf)
    + {
     @@ compat/mingw.c: int handle_long_path(wchar_t *path, int len, int max_path, int expand)
      	 * "cwd + path" doesn't due to '..' components)
      	 */
  • 160: 78cfa1f = 173: a8e3f89 compat/fsmonitor/fsm-*-win32: support long paths

  • 161: e971fb3 ! 174: b271859 clean: suggest using core.longPaths if paths are too long to remove

    @@ Commit message
     
      ## Documentation/config/advice.txt ##
     @@ Documentation/config/advice.txt: advice.*::
    - 		Advice on how to set your identity configuration when
    - 		your information is guessed from the system username and
    - 		domain name.
    + 		set their identity configuration.
    + 	mergeConflict::
    + 		Shown when various commands stop because of conflicts.
     +	nameTooLong::
     +		Advice shown if a filepath operation is attempted where the
     +		path was too long.
      	nestedTag::
    - 		Advice shown if a user attempts to recursively tag a tag object.
    + 		Shown when a user attempts to recursively tag a tag object.
      	pushAlreadyExists::
     
      ## advice.c ##
     @@ advice.c: static struct {
    - 	[ADVICE_GRAFT_FILE_DEPRECATED]			= { "graftFileDeprecated" },
      	[ADVICE_IGNORED_HOOK]				= { "ignoredHook" },
      	[ADVICE_IMPLICIT_IDENTITY]			= { "implicitIdentity" },
    + 	[ADVICE_MERGE_CONFLICT]				= { "mergeConflict" },
     +	[ADVICE_NAME_TOO_LONG]				= { "nameTooLong" },
      	[ADVICE_NESTED_TAG]				= { "nestedTag" },
      	[ADVICE_OBJECT_NAME_WARNING]			= { "objectNameWarning" },
    @@ advice.c: static struct {
     
      ## advice.h ##
     @@ advice.h: enum advice_type {
    - 	ADVICE_GRAFT_FILE_DEPRECATED,
      	ADVICE_IGNORED_HOOK,
      	ADVICE_IMPLICIT_IDENTITY,
    + 	ADVICE_MERGE_CONFLICT,
     +	ADVICE_NAME_TOO_LONG,
      	ADVICE_NESTED_TAG,
      	ADVICE_OBJECT_NAME_WARNING,
    @@ builtin/clean.c
      #include "prompt.h"
     +#include "advice.h"
      
    - static int force = -1; /* unset */
    + static int require_force = -1; /* unset */
      static int interactive;
     @@ builtin/clean.c: static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,
      			quote_path(path->buf, prefix, &quoted, 0);
  • 159: 7053e81 = 175: 1d2fe7f mingw: Support git_terminal_prompt with more terminals

  • 162: 22df5ca = 176: 70c126d compat/terminal.c: only use the Windows console if bash 'read -r' fails

  • 163: 41d9f78 = 177: 7e386ab mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method

  • 164: e8164d3 = 178: f9b2fa7 Unbreak interactive GPG prompt upon signing

  • 165: 429ee93 = 179: cc58bd3 strbuf_readlink: don't call readlink twice if hint is the exact link size

  • 166: 3fa5764 = 180: 8efd366 strbuf_readlink: support link targets that exceed PATH_MAX

  • 167: 756ab38 = 181: 47a48f7 lockfile.c: use is_dir_sep() instead of hardcoded '/' checks

  • 168: 3aae221 = 182: fccc92e Win32: don't call GetFileAttributes twice in mingw_lstat()

  • 169: 1d64bbf = 183: a3fada3 Win32: implement stat() with symlink support

  • 170: 05512a4 = 184: edf1ac4 Win32: remove separate do_lstat() function

  • 171: 20e81f0 = 185: d916ead Win32: let mingw_lstat() error early upon problems with reparse points

  • 172: 5a068ec = 186: 494e037 mingw: teach fscache and dirent about symlinks

  • 173: d3e3d71 = 187: ca04ece Win32: lstat(): return adequate stat.st_size for symlinks

  • 174: b7c06d6 = 188: f35df23 Win32: factor out retry logic

  • 175: 0126843 = 189: 8384810 Win32: change default of 'core.symlinks' to false

  • 176: 95d1af8 = 190: c9a57db Win32: add symlink-specific error codes

  • 177: 81743f0 = 191: 71e8445 Win32: mingw_unlink: support symlinks to directories

  • 178: d61f05b = 192: e84d653 Win32: mingw_rename: support renaming symlinks

  • 179: cf4045c = 193: af7c131 Win32: mingw_chdir: change to symlink-resolved directory

  • 180: 3ecf442 = 194: 852ccc5 Win32: implement readlink()

  • 181: cfac282 = 195: 50e714d mingw: lstat: compute correct size for symlinks

  • 182: 3374e63 = 196: 0b1ee12 Win32: implement basic symlink() functionality (file symlinks only)

  • 183: 7934ce8 ! 197: fb06aaa Win32: symlink: add support for symlinks to directories

    @@ Commit message
         Signed-off-by: Johannes Schindelin <[email protected]>
     
      ## compat/mingw.c ##
    -@@ compat/mingw.c: int mingw_core_config(const char *var, const char *value,
    - 	return 0;
    +@@ compat/mingw.c: static inline int is_wdir_sep(wchar_t wchar)
    + 	return wchar == L'/' || wchar == L'\\';
      }
      
    -+enum phantom_symlink_result {
    -+	PHANTOM_SYMLINK_RETRY,
    -+	PHANTOM_SYMLINK_DONE,
    -+	PHANTOM_SYMLINK_DIRECTORY
    -+};
    -+
    -+static inline int is_wdir_sep(wchar_t wchar)
    -+{
    -+	return wchar == L'/' || wchar == L'\\';
    -+}
    -+
     +static const wchar_t *make_relative_to(const wchar_t *path,
     +				       const wchar_t *relative_to, wchar_t *out,
     +				       size_t size)
    @@ compat/mingw.c: int mingw_core_config(const char *var, const char *value,
     +	return out;
     +}
     +
    ++enum phantom_symlink_result {
    ++	PHANTOM_SYMLINK_RETRY,
    ++	PHANTOM_SYMLINK_DONE,
    ++	PHANTOM_SYMLINK_DIRECTORY
    ++};
    ++
     +/*
     + * Changes a file symlink to a directory symlink if the target exists and is a
     + * directory.
  • 184: 4e373b8 ! 198: ff790d2 mingw: try to create symlinks without elevated permissions

    @@ Commit message
         Signed-off-by: Johannes Schindelin <[email protected]>
     
      ## compat/mingw.c ##
    -@@ compat/mingw.c: int mingw_core_config(const char *var, const char *value,
    - 	return 0;
    +@@ compat/mingw.c: static const wchar_t *make_relative_to(const wchar_t *path,
    + 	return out;
      }
      
     +static DWORD symlink_file_flags = 0, symlink_directory_flags = 1;
  • 185: 89d4082 = 199: 2521301 mingw: emulate stat() a little more faithfully

  • 186: 992cc80 = 200: 88a3aaa mingw: special-case index entries for symlinks with buggy size

  • 190: b210c4e = 201: ce09890 Win32: symlink: move phantom symlink creation to a separate function

  • 187: 7be3b3a ! 202: 040e34d mingw: introduce code to detect whether we're inside a Windows container

    @@ Commit message
         Signed-off-by: Johannes Schindelin <[email protected]>
     
      ## compat/mingw.c ##
    -@@ compat/mingw.c: int uname(struct utsname *buf)
    - 		  "%u", (v >> 16) & 0x7fff);
    - 	return 0;
    +@@ compat/mingw.c: int mingw_have_unix_sockets(void)
    + 	}
    + 	return ret;
      }
     +
     +/*
    @@ compat/mingw.c: int uname(struct utsname *buf)
     +}
     
      ## compat/mingw.h ##
    -@@ compat/mingw.h: void open_in_gdb(void);
    -  * Used by Pthread API implementation for Windows
    -  */
    - int err_win_to_posix(DWORD winerr);
    +@@ compat/mingw.h: int mingw_have_unix_sockets(void);
    + #undef have_unix_sockets
    + #define have_unix_sockets mingw_have_unix_sockets
    + #endif
     +
     +/*
     + * Check current process is inside Windows Container.
  • 191: 6386870 = 203: f476ce5 Introduce helper to create symlinks that knows about index_state

  • 188: 013eda5 = 204: 4498981 mingw: when running in a Windows container, try to rename() harder

  • 192: 2f99f99 = 205: bc0e662 mingw: allow to specify the symlink type in .gitattributes

  • 189: 611eabc = 206: 5529814 mingw: move the file_attr_to_st_mode() function definition

  • 193: 67fe40d = 207: 91faa9f Win32: symlink: add test for symlink attribute

  • 198: 9edd88c = 208: 7c589ee mingw: Windows Docker volumes are not symbolic links

  • 194: ae4c6b6 = 209: 25f5877 mingw: explicitly specify with which cmd to prefix the cmdline

  • 200: 8ffc879 = 210: 31f2a58 mingw: work around rename() failing on a read-only file

  • 195: c5b9c4b = 211: 19cf1cd mingw: when path_lookup() failed, try BusyBox

  • 196: 7625cef = 212: 09ee1d4 test-lib: avoid unnecessary Perl invocation

  • 197: ddbb69a = 213: 4f283d0 test-tool: learn to act as a drop-in replacement for iconv

  • 199: 9e8d658 = 214: 5e123d3 tests(mingw): if iconv is unavailable, use test-helper --iconv

  • 201: ae6a020 = 215: bdd67e4 gitattributes: mark .png files as binary

  • 202: eddcae4 = 216: 00740dc tests: move test PNGs into t/lib-diff/

  • 203: 8a90932 = 217: f780066 tests: only override sort & find if there are usable ones in /usr/bin/

  • 204: ba47334 = 218: 44324f5 tests: use the correct path separator with BusyBox

  • 205: c194c5e = 219: 3581339 mingw: only use Bash-ism builtin pwd -W when available

  • 206: dd9d056 = 220: 97cc8c3 tests (mingw): remove Bash-specific pwd option

  • 207: 23ddde7 = 221: e2c1ce1 test-lib: add BUSYBOX prerequisite

  • 208: f0f57df = 222: b54eca3 t5003: use binary file from t/lib-diff/

  • 209: 402447a = 223: b8781a5 t5532: workaround for BusyBox on Windows

  • 210: d4c7a3f = 224: b2f64e8 t5605: special-case hardlink test for BusyBox-w32

  • 211: f9669a6 = 225: 7d00ceb t5813: allow for $PWD to be a Windows path

  • 212: ff12d28 = 226: 371668f t9200: skip tests when $PWD contains a colon

  • 213: a919d31 ! 227: 7055b68 mingw: add a Makefile target to copy test artifacts

    @@ config.mak.uname
     @@ config.mak.uname: ifeq ($(uname_S),MINGW)
      		ETC_GITCONFIG = ../etc/gitconfig
      		ETC_GITATTRIBUTES = ../etc/gitattributes
    - 	endif
    +         endif
     +ifeq (i686,$(uname_M))
     +	MINGW_PREFIX := mingw32
     +endif
  • 215: 339a508 = 228: 04b8b48 mingw: kill child processes in a gentler way

  • 216: 0a89d0f = 229: 39b6605 mingw: do not call xutftowcs_path in mingw_mktemp

  • 214: 1d64d94 = 230: 8a37237 mingw: optionally enable wsl compability file mode bits

  • 217: 71f8e1c = 231: 93d6e0f mingw: really handle SIGINT

  • 218: 5a2b8b2 = 232: a446ba7 Partially un-revert "editor: save and reset terminal after calling EDITOR"

  • 232: 3242311 (upstream: 3242311) < -: ----------- http: reset POSTFIELDSIZE when clearing curl handle

  • 233: c28ee09 (upstream: c28ee09) < -: ----------- INSTALL: bump libcurl version to 7.21.3

  • 234: 92a209b (upstream: 92a209b) < -: ----------- remote-curl: add Transfer-Encoding header only for older curl

  • 235: 729fd15 (upstream: 199f44c) < -: ----------- builtin/clone: allow remote helpers to detect repo

PhilipOakley and others added 30 commits April 19, 2024 21:59
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 <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
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 <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
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 <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
This is another fall-out of the recent refactoring flurry.

Signed-off-by: Johannes Schindelin <[email protected]>
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 <[email protected]>
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 <[email protected]>
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]>
This fixes the build after 7bc341e (git-compat-util: add a test
balloon for C99 support, 2021-12-01).

Signed-off-by: Johannes Schindelin <[email protected]>
This is now passed by default, ever since 6a8cbc4 (developer: enable
pedantic by default, 2021-09-03).

Signed-off-by: Johannes Schindelin <[email protected]>
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]>
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]>
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]>
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]>
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]>
swigger and others added 21 commits April 19, 2024 22:44
The Windows Subsystem for Linux (WSL) version 2 allows to use `chmod` on
NTFS volumes provided that they are mounted with metadata enabled (see
https://devblogs.microsoft.com/commandline/chmod-chown-wsl-improvements/
for details), for example:

	$ chmod 0755 /mnt/d/test/a.sh

In order to facilitate better collaboration between the Windows
version of Git and the WSL version of Git, we can make the Windows
version of Git also support reading and writing NTFS file modes
in a manner compatible with WSL.

Since this slightly slows down operations where lots of files are
created (such as an initial checkout), this feature is only enabled when
`core.WSLCompat` is set to true. Note that you also have to set
`core.fileMode=true` in repositories that have been initialized without
enabling WSL compatibility.

There are several ways to enable metadata loading for NTFS volumes
in WSL, one of which is to modify `/etc/wsl.conf` by adding:

```
[automount]
enabled = true
options = "metadata,umask=027,fmask=117"
```

And reboot WSL.

It can also be enabled temporarily by this incantation:

	$ sudo umount /mnt/c &&
	  sudo mount -t drvfs C: /mnt/c -o metadata,uid=1000,gid=1000,umask=22,fmask=111

It's important to note that this modification is compatible with, but
does not depend on WSL. The helper functions in this commit can operate
independently and functions normally on devices where WSL is not
installed or properly configured.

Signed-off-by: xungeng li <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
Previously, we did not install any handler for Ctrl+C, but now we really
want to because the MSYS2 runtime learned the trick to call the
ConsoleCtrlHandler when Ctrl+C was pressed.

With this, hitting Ctrl+C while `git log` is running will only terminate
the Git process, but not the pager. This finally matches the behavior on
Linux and on macOS.

Signed-off-by: Johannes Schindelin <[email protected]>
The `xutftowcs_path` function canonicalizes absolute paths using GetFullPathNameW.
This canonicalization may change the length of the string (e.g. getting rid of \.\),
which breaks callers that pass the template string in a strbuf and expect the
length of the string to remain the same.

In my particular case, the tmp-objdir code is passing a strbuf to mkdtemp and is
breaking since the strbuf.len is no longer synchronized with strlen(strbuf.buf).

Signed-off-by: Neeraj K. Singh <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
…ITOR"

In e3f7e01 (Revert "editor: save and reset terminal after calling
EDITOR", 2021-11-22), we reverted the commit wholesale where the
terminal state would be saved and restored before/after calling an
editor.

The reverted commit was intended to fix a problem with Windows Terminal
where simply calling `vi` would cause problems afterwards.

To fix the problem addressed by the revert, but _still_ keep the problem
with Windows Terminal fixed, let's revert the revert, with a twist: we
restrict the save/restore _specifically_ to the case where `vi` (or
`vim`) is called, and do not do the same for any other editor.

This should still catch the majority of the cases, and will bridge the
time until the original patch is re-done in a way that addresses all
concerns.

Signed-off-by: Johannes Schindelin <[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]>
@dscho dscho linked an issue Apr 19, 2024 that may be closed by this pull request
@dscho dscho added this to the Next release milestone Apr 19, 2024
@dscho
Copy link
Member Author

dscho commented Apr 19, 2024

/git-artifacts

The tag-git workflow run was started

dscho added a commit to dscho/gfw-helper-github-app that referenced this pull request Apr 19, 2024
Over in git-for-windows/git#4918, _something_ in
the range-diff was matched _somehow_ by that search string. The
`text_matches` of the returned objects look like this:

  text_matches: [
    {
      object_url: "https://api.github.com/repositories/23216272/issues/comments/2067288321",
      object_type: "IssueComment",
      property: "body",
      fragment: "/git-artifacts\n\nThe tag-git workflow run was started\n",
      matches: [
        {
          text: "git",
          indices: [
            1,
            4,
          ],
        },
        {
          text: "artifacts",
          indices: [
            5,
            14,
          ],
        },
        {
          text: "git",
          indices: [
            24,
            27,
          ],
        },
      ],
    },
    {
      object_url: "https://api.github.com/repositories/23216272/issues/4918",
      object_type: "Issue",
      property: "body",
      fragment: " = 53: 33d9a68ea63 vcxproj: handle GUI programs, too\n\n  - 55: 417ce96c240 = 54: 4c3acea6c21 ci(vs-build) also build Windows/ARM64 artifacts\n\n  - 52: d044e202fa2 = 55: ac6ad169b01 cmake: install",
      matches: [
        {
          text: "artifacts",
          indices: [
            130,
            139,
          ],
        },
      ],
    },
  ],

In other words, there is not even the word "git" in the matches, and
we'll just have to deal with this possible scenario.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho
Copy link
Member Author

dscho commented Apr 19, 2024

/release

The release-git workflow run was started

@gitforwindowshelper gitforwindowshelper bot merged commit e7cb112 into git-for-windows:main Apr 19, 2024
65 of 66 checks passed
@dscho dscho deleted the rebase-to-v2.45.0-rc0 branch April 19, 2024 21:56
dscho added a commit to dscho/gfw-helper-github-app that referenced this pull request Apr 20, 2024
Over in git-for-windows/git#4918, _something_ in
the range-diff was matched _somehow_ by that search string. The
`text_matches` of the returned objects look like this:

  text_matches: [
    {
      object_url: "https://api.github.com/repositories/23216272/issues/comments/2067288321",
      object_type: "IssueComment",
      property: "body",
      fragment: "/git-artifacts\n\nThe tag-git workflow run was started\n",
      matches: [
        {
          text: "git",
          indices: [
            1,
            4,
          ],
        },
        {
          text: "artifacts",
          indices: [
            5,
            14,
          ],
        },
        {
          text: "git",
          indices: [
            24,
            27,
          ],
        },
      ],
    },
    {
      object_url: "https://api.github.com/repositories/23216272/issues/4918",
      object_type: "Issue",
      property: "body",
      fragment: " = 53: 33d9a68ea63 vcxproj: handle GUI programs, too\n\n  - 55: 417ce96c240 = 54: 4c3acea6c21 ci(vs-build) also build Windows/ARM64 artifacts\n\n  - 52: d044e202fa2 = 55: ac6ad169b01 cmake: install",
      matches: [
        {
          text: "artifacts",
          indices: [
            130,
            139,
          ],
        },
      ],
    },
  ],

In other words, there is not even the word "git" in the matches, and
we'll just have to deal with this possible scenario.

Signed-off-by: Johannes Schindelin <[email protected]>
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.45.0-rc0