{"thread":{"id":"63320","subject":"[PATCH 0/6] Support Windows/ARM64","startedAt":"2025-04-21T12:39:13Z","lastAt":"2025-04-23T16:20:08Z","messageCount":20,"participants":["Johannes Schindelin via GitGitGadget","Dennis Ameling via GitGitGadget","Junio C Hamano","Patrick Steinhardt","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"516422","messageId":"pull.1904.git.1745239150.gitgitgadget@gmail.com","threadId":"63320","inReplyTo":null,"subject":"[PATCH 0/6] Support Windows/ARM64","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-04-21T12:39:04Z","receivedAt":"2025-04-21T12:39:13Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Git for Windows has started building artifacts for Windows/ARM64 since\nv2.47.1 (November 25th 2024). Now that Windows/ARM64 GitHub Action runners\nare available in public preview\n[https://github.blog/changelog/2025-04-14-windows-arm64-hosted-runners-now-available-in-public-preview/]\nat long last, it is high time to upstream the minimal set of patches to\nbuild Git on Windows/ARM64 and pass the test suite.\n\nDennis Ameling (2):\n  bswap.h: add support for built-in bswap functions\n  config.mak.uname: add support for clangarm64\n\nJohannes Schindelin (4):\n  mingw: do not use nedmalloc on Windows/ARM64\n  msvc: do handle builds on Windows/ARM64\n  mingw(arm64): do move the `/etc/git*` location\n  max_tree_depth: lower it for clangarm64 on Windows\n\n compat/bswap.h   | 14 +++++++++++++-\n config.mak.uname | 18 ++++++++++++++----\n environment.c    | 12 ++++++++++++\n 3 files changed, 39 insertions(+), 5 deletions(-)\n\n\nbase-commit: 683c54c999c301c2cd6f715c411407c413b1d84e\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1904%2Fdscho%2Fsupport-clangarm64-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1904/dscho/support-clangarm64-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/1904\n-- \ngitgitgadget\n"},{"id":"516423","messageId":"b89f39cbac6abb23ce1f6a987dc864181af2f395.1745239150.git.gitgitgadget@gmail.com","threadId":"63320","inReplyTo":"pull.1904.git.1745239150.gitgitgadget@gmail.com","subject":"[PATCH 1/6] bswap.h: add support for built-in bswap functions","fromName":"Dennis Ameling via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-04-21T12:39:05Z","receivedAt":"2025-04-21T12:39:14Z","isPatch":true,"sender":{"key":"name:Dennis Ameling","avatar":null},"body":"From: Dennis Ameling <dennis@dennisameling.com>\n\nNewer compiler versions, like GCC 10 and Clang 12, have built-in\nfunctions for bswap32 and bswap64. This comes in handy, for example,\nwhen targeting CLANGARM64 on Windows, which would not be supported\nwithout this logic.\n\nSigned-off-by: Dennis Ameling <dennis@dennisameling.com>\n---\n compat/bswap.h | 14 +++++++++++++-\n 1 file changed, 13 insertions(+), 1 deletion(-)\n\ndiff --git a/compat/bswap.h b/compat/bswap.h\nindex b34054f2bd7..9e0f98e00b9 100644\n--- a/compat/bswap.h\n+++ b/compat/bswap.h\n@@ -35,7 +35,19 @@ static inline uint64_t default_bswap64(uint64_t val)\n #undef bswap32\n #undef bswap64\n \n-#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))\n+/**\n+ * __has_builtin is available since Clang 10 and GCC 10.\n+ * Below is a fallback for older compilers.\n+ */\n+#ifndef __has_builtin\n+\t#define __has_builtin(x) 0\n+#endif\n+\n+#if __has_builtin(__builtin_bswap32) && __has_builtin(__builtin_bswap64)\n+#define bswap32(x) __builtin_bswap32((x))\n+#define bswap64(x) __builtin_bswap64((x))\n+\n+#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))\n \n #define bswap32 git_bswap32\n static inline uint32_t git_bswap32(uint32_t x)\n-- \ngitgitgadget\n\n"},{"id":"516424","messageId":"2feeadb0d3fb7a631489e36d861d112d46423f2a.1745239150.git.gitgitgadget@gmail.com","threadId":"63320","inReplyTo":"pull.1904.git.1745239150.gitgitgadget@gmail.com","subject":"[PATCH 2/6] config.mak.uname: add support for clangarm64","fromName":"Dennis Ameling via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-04-21T12:39:06Z","receivedAt":"2025-04-21T12:39:15Z","isPatch":true,"sender":{"key":"name:Dennis Ameling","avatar":null},"body":"From: Dennis Ameling <dennis@dennisameling.com>\n\nCLANGARM64 is a relatively new MSYSTEM added by the MSYS2 team. In order\nto have Git build correctly for this platform, let's add some\nconfiguration for it to config.mak.uname.\n\nSigned-off-by: Dennis Ameling <dennis@dennisameling.com>\n---\n config.mak.uname | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex b12d4e168ae..1e5d89f1aa4 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -724,6 +724,10 @@ ifeq ($(uname_S),MINGW)\n \t\tprefix = /mingw64\n \t\tHOST_CPU = x86_64\n \t\tBASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup\n+        else ifeq (CLANGARM64,$(MSYSTEM))\n+\t\tprefix = /clangarm64\n+\t\tHOST_CPU = aarch64\n+\t\tBASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup\n         else\n \t\tCOMPAT_CFLAGS += -D_USE_32BIT_TIME_T\n \t\tBASIC_LDFLAGS += -Wl,--large-address-aware\n-- \ngitgitgadget\n\n"},{"id":"516425","messageId":"6c2e17eca68b143eff7b33d195bc66a486471547.1745239150.git.gitgitgadget@gmail.com","threadId":"63320","inReplyTo":"pull.1904.git.1745239150.gitgitgadget@gmail.com","subject":"[PATCH 3/6] mingw: do not use nedmalloc on Windows/ARM64","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-04-21T12:39:07Z","receivedAt":"2025-04-21T12:39:16Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIt does not compile there, and seeing as nedmalloc has been pretty much\nunmaintained since at least November 2017, as per\nhttps://github.com/ned14/nedmalloc/issues/20#issuecomment-343432314,\nthere is also no hope that any fixes will materialize there.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n config.mak.uname | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 1e5d89f1aa4..6222d2c5a48 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -742,7 +742,9 @@ ifeq ($(uname_S),MINGW)\n \tHAVE_LIBCHARSET_H = YesPlease\n \tUSE_GETTEXT_SCHEME = fallthrough\n \tUSE_LIBPCRE = YesPlease\n-\tUSE_NED_ALLOCATOR = YesPlease\n+\tifneq (CLANGARM64,$(MSYSTEM))\n+\t\tUSE_NED_ALLOCATOR = YesPlease\n+\tendif\n         ifeq (/mingw64,$(subst 32,64,$(prefix)))\n \t\t# Move system config into top-level /etc/\n \t\tETC_GITCONFIG = ../etc/gitconfig\n-- \ngitgitgadget\n\n"},{"id":"516426","messageId":"c89ead8eaba7f824d6a4828964f8384f60b17101.1745239150.git.gitgitgadget@gmail.com","threadId":"63320","inReplyTo":"pull.1904.git.1745239150.gitgitgadget@gmail.com","subject":"[PATCH 4/6] msvc: do handle builds on Windows/ARM64","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-04-21T12:39:08Z","receivedAt":"2025-04-21T12:39:17Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nGit for Windows/ARM64 settled on using `clang` to compile `git.exe`, and\nhence needs to run in a system where `MSYSTEM` is set to `CLANGARM64`\nand the prefix to use is `/clangarm64`.\n\nWe already did that in the `MINGW` arm, i.e. for regular Git for Windows\nbuilds using MINGW GCC (or `clang`'s shim pretending to be GCC), now it\nis time to do the same in the MS Visual C part.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n config.mak.uname | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 6222d2c5a48..bd94f458088 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -432,7 +432,11 @@ ifeq ($(uname_S),Windows)\n         ifeq (MINGW32,$(MSYSTEM))\n \t\tprefix = /mingw32\n         else\n-\t\tprefix = /mingw64\n+\t\tifeq (CLANGARM64,$(MSYSTEM))\n+\t\t\tprefix = /clangarm64\n+\t\telse\n+\t\t\tprefix = /mingw64\n+\t\tendif\n         endif\n \t# Prepend MSVC 64-bit tool-chain to PATH.\n \t#\n-- \ngitgitgadget\n\n"},{"id":"516427","messageId":"6ebc3ef57fd0455fc70c4a8531c7ed094d9cdaff.1745239150.git.gitgitgadget@gmail.com","threadId":"63320","inReplyTo":"pull.1904.git.1745239150.gitgitgadget@gmail.com","subject":"[PATCH 6/6] max_tree_depth: lower it for clangarm64 on Windows","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-04-21T12:39:10Z","receivedAt":"2025-04-21T12:39:18Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nJust as in b64d78ad02ca (max_tree_depth: lower it for MSVC to avoid\nstack overflows, 2023-11-01), I encountered the same problem with the\nclang builds on Windows/ARM64.\n\nThe symptom is an exit code 127 when t6700 tries to verify that `git\narchive big` fails.\n\nThis exit code is reserved on Unix/Linux to mean \"command not found\".\nUnfortunately in this case, it is the fall-back chosen by\nCygwin's `pinfo::status_exit()` method when encountering\nthe NSTATUS `STATUS_STACK_OVERFLOW`, see\nhttps://github.com/cygwin/cygwin/blob/cygwin-3.6.1/winsup/cygwin/pinfo.cc#L171\n\nI verified manually that the stack overflow always happens somewhere\naround tree depth 1403, therefore 1280 should be a safe bound in these\ninstances.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n environment.c | 12 ++++++++++++\n 1 file changed, 12 insertions(+)\n\ndiff --git a/environment.c b/environment.c\nindex 9e4c7781be0..cc853950bb2 100644\n--- a/environment.c\n+++ b/environment.c\n@@ -82,9 +82,21 @@ int max_allowed_tree_depth =\n \t * the stack overflow can occur.\n \t */\n \t512;\n+#else\n+#if defined(GIT_WINDOWS_NATIVE) && defined(__clang__) && defined(__aarch64__)\n+\t/*\n+\t * Similar to Visual C, it seems that on Windows/ARM64 the clang-based\n+\t * builds have a smaller stack space available. When running out of\n+\t * that stack space, a `STATUS_STACK_OVERFLOW` is produced. When the\n+\t * Git command was run from an MSYS2 Bash, this unfortunately results\n+\t * in an exit code 127. Let's prevent that by lowering the maximal\n+\t * tree depth; This value seems to be low enough.\n+\t */\n+\t1280;\n #else\n \t2048;\n #endif\n+#endif\n \n #ifndef PROTECT_HFS_DEFAULT\n #define PROTECT_HFS_DEFAULT 0\n-- \ngitgitgadget\n"},{"id":"516428","messageId":"939bcb0dc63f7f9dff71588182c7f384341f8432.1745239150.git.gitgitgadget@gmail.com","threadId":"63320","inReplyTo":"pull.1904.git.1745239150.gitgitgadget@gmail.com","subject":"[PATCH 5/6] mingw(arm64): do move the `/etc/git*` location","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-04-21T12:39:09Z","receivedAt":"2025-04-21T12:39:18Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn fb5e3378f8 (mingw: move Git for Windows' system config where users\nexpect it, 2021-06-22), I moved the location of Git for Windows' system\nconfig and system Git attributes file to the top-level `/etc/` directory\n(because it is a much more obvious location than, say, `/mingw64/etc/`).\n\nThe patch relied on a very specific scenario that the newly-supported\nWindows/ARM64 builds of `git.exe` fails to fall into. So let's broaden\nthe condition a bit, so that Windows/ARM64 builds also use that location\n(instead of the even more obscure `/clangarm64/etc/` directory).\n\nThis fixes https://github.com/git-for-windows/git/issues/5431.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n config.mak.uname | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex bd94f458088..9a95ba8c9ab 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -489,7 +489,7 @@ ifeq ($(uname_S),Windows)\n \tNO_POSIX_GOODIES = UnfortunatelyYes\n \tNATIVE_CRLF = YesPlease\n \tDEFAULT_HELP_FORMAT = html\n-ifeq (/mingw64,$(subst 32,64,$(prefix)))\n+ifeq (/mingw64,$(subst 32,64,$(subst clangarm,mingw,$(prefix))))\n \t# Move system config into top-level /etc/\n \tETC_GITCONFIG = ../etc/gitconfig\n \tETC_GITATTRIBUTES = ../etc/gitattributes\n@@ -749,7 +749,7 @@ ifeq ($(uname_S),MINGW)\n \tifneq (CLANGARM64,$(MSYSTEM))\n \t\tUSE_NED_ALLOCATOR = YesPlease\n \tendif\n-        ifeq (/mingw64,$(subst 32,64,$(prefix)))\n+        ifeq (/mingw64,$(subst 32,64,$(subst clangarm,mingw,$(prefix))))\n \t\t# Move system config into top-level /etc/\n \t\tETC_GITCONFIG = ../etc/gitconfig\n \t\tETC_GITATTRIBUTES = ../etc/gitattributes\n-- \ngitgitgadget\n\n"},{"id":"516430","messageId":"xmqqcyd57i2q.fsf@gitster.g","threadId":"63320","inReplyTo":"pull.1904.git.1745239150.gitgitgadget@gmail.com","subject":"Re: [PATCH 0/6] Support Windows/ARM64","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-04-21T13:35:57Z","receivedAt":"2025-04-21T13:36:00Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> Git for Windows has started building artifacts for Windows/ARM64 since\n> v2.47.1 (November 25th 2024). Now that Windows/ARM64 GitHub Action runners\n> are available in public preview\n> [https://github.blog/changelog/2025-04-14-windows-arm64-hosted-runners-now-available-in-public-preview/]\n> at long last, it is high time to upstream the minimal set of patches to\n> build Git on Windows/ARM64 and pass the test suite.\n>\n> Dennis Ameling (2):\n>   bswap.h: add support for built-in bswap functions\n>   config.mak.uname: add support for clangarm64\n>\n> Johannes Schindelin (4):\n>   mingw: do not use nedmalloc on Windows/ARM64\n>   msvc: do handle builds on Windows/ARM64\n>   mingw(arm64): do move the `/etc/git*` location\n>   max_tree_depth: lower it for clangarm64 on Windows\n>\n>  compat/bswap.h   | 14 +++++++++++++-\n>  config.mak.uname | 18 ++++++++++++++----\n>  environment.c    | 12 ++++++++++++\n>  3 files changed, 39 insertions(+), 5 deletions(-)\n>\n>\n> base-commit: 683c54c999c301c2cd6f715c411407c413b1d84e\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1904%2Fdscho%2Fsupport-clangarm64-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1904/dscho/support-clangarm64-v1\n> Pull-Request: https://github.com/gitgitgadget/git/pull/1904\n\nWill queue.  Thanks for a cleanly structured series.\n\n"},{"id":"516476","messageId":"aAdIlq8Np8LpahLS@pks.im","threadId":"63320","inReplyTo":"6c2e17eca68b143eff7b33d195bc66a486471547.1745239150.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 3/6] mingw: do not use nedmalloc on Windows/ARM64","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-04-22T07:43:18Z","receivedAt":"2025-04-22T07:43:22Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Mon, Apr 21, 2025 at 12:39:07PM +0000, Johannes Schindelin via GitGitGadget wrote:\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> \n> It does not compile there, and seeing as nedmalloc has been pretty much\n> unmaintained since at least November 2017, as per\n> https://github.com/ned14/nedmalloc/issues/20#issuecomment-343432314,\n> there is also no hope that any fixes will materialize there.\n\nThis kind of raises the question whether we want to keep on maintaining\nnedmalloc in our codebase at all. Is there any strong reason to have it?\n\nPatrick\n"},{"id":"516477","messageId":"aAdImbydzMUkCFqB@pks.im","threadId":"63320","inReplyTo":"6ebc3ef57fd0455fc70c4a8531c7ed094d9cdaff.1745239150.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 6/6] max_tree_depth: lower it for clangarm64 on Windows","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-04-22T07:43:21Z","receivedAt":"2025-04-22T07:43:25Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Mon, Apr 21, 2025 at 12:39:10PM +0000, Johannes Schindelin via GitGitGadget wrote:\n> diff --git a/environment.c b/environment.c\n> index 9e4c7781be0..cc853950bb2 100644\n> --- a/environment.c\n> +++ b/environment.c\n> @@ -82,9 +82,21 @@ int max_allowed_tree_depth =\n>  \t * the stack overflow can occur.\n>  \t */\n>  \t512;\n> +#else\n> +#if defined(GIT_WINDOWS_NATIVE) && defined(__clang__) && defined(__aarch64__)\n\nTiny nit, only because it puzzled me for a second: this should probably\nbe `#elif`.\n\n> +\t/*\n> +\t * Similar to Visual C, it seems that on Windows/ARM64 the clang-based\n> +\t * builds have a smaller stack space available. When running out of\n> +\t * that stack space, a `STATUS_STACK_OVERFLOW` is produced. When the\n> +\t * Git command was run from an MSYS2 Bash, this unfortunately results\n> +\t * in an exit code 127. Let's prevent that by lowering the maximal\n> +\t * tree depth; This value seems to be low enough.\n> +\t */\n> +\t1280;\n>  #else\n>  \t2048;\n>  #endif\n> +#endif\n\nHm. This whole construct feels rather awful, if you ask me. Instead of\npapering over the issue it would be nice if we eventually fixed the root\ncause, which is that we use recursion on a data structure that has an\nunbounded depth in theory.\n\nAnyway, that is clearly outside of the scope of this patch series, so\nthe bandaid is good enough for now.\n\nPatrick\n"},{"id":"516478","messageId":"17780ada-bb64-c780-939f-0702f53dd3ca@gmx.de","threadId":"63320","inReplyTo":"aAdImbydzMUkCFqB@pks.im","subject":"Re: [PATCH 6/6] max_tree_depth: lower it for clangarm64 on Windows","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2025-04-22T07:49:40Z","receivedAt":"2025-04-22T07:49:42Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Patrick,\n\nOn Tue, 22 Apr 2025, Patrick Steinhardt wrote:\n\n> On Mon, Apr 21, 2025 at 12:39:10PM +0000, Johannes Schindelin via GitGitGadget wrote:\n> > diff --git a/environment.c b/environment.c\n> > index 9e4c7781be0..cc853950bb2 100644\n> > --- a/environment.c\n> > +++ b/environment.c\n> > @@ -82,9 +82,21 @@ int max_allowed_tree_depth =\n> >  \t * the stack overflow can occur.\n> >  \t */\n> >  \t512;\n> > +#else\n> > +#if defined(GIT_WINDOWS_NATIVE) && defined(__clang__) && defined(__aarch64__)\n> \n> Tiny nit, only because it puzzled me for a second: this should probably\n> be `#elif`.\n\nI will change it.\n\n> > +\t/*\n> > +\t * Similar to Visual C, it seems that on Windows/ARM64 the clang-based\n> > +\t * builds have a smaller stack space available. When running out of\n> > +\t * that stack space, a `STATUS_STACK_OVERFLOW` is produced. When the\n> > +\t * Git command was run from an MSYS2 Bash, this unfortunately results\n> > +\t * in an exit code 127. Let's prevent that by lowering the maximal\n> > +\t * tree depth; This value seems to be low enough.\n> > +\t */\n> > +\t1280;\n> >  #else\n> >  \t2048;\n> >  #endif\n> > +#endif\n> \n> Hm. This whole construct feels rather awful, if you ask me. Instead of\n> papering over the issue it would be nice if we eventually fixed the root\n> cause, which is that we use recursion on a data structure that has an\n> unbounded depth in theory.\n\nTrue.\n\nIt is also quite awful that I cannot find a way to represent\n`STATUS_STACK_OVERFLOW` by anything else than exit code 127, which always\nmisleads me into thinking that an executable or a DLL might be missing.\nBut I did not find any.\n\n> Anyway, that is clearly outside of the scope of this patch series, so\n> the bandaid is good enough for now.\n\nTrue enough!\n\nThank you,\nJohannes\n"},{"id":"516480","messageId":"00fd3145-b3d2-ddab-466d-d06fd27298ec@gmx.de","threadId":"63320","inReplyTo":"aAdIlq8Np8LpahLS@pks.im","subject":"Dropping nedmalloc support? was Re: [PATCH 3/6] mingw: do not use nedmalloc on Windows/ARM64","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2025-04-22T08:17:09Z","receivedAt":"2025-04-22T08:17:15Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Patrick,\n\nOn Tue, 22 Apr 2025, Patrick Steinhardt wrote:\n\n> On Mon, Apr 21, 2025 at 12:39:07PM +0000, Johannes Schindelin via GitGitGadget wrote:\n> > From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> > \n> > It does not compile there, and seeing as nedmalloc has been pretty much\n> > unmaintained since at least November 2017, as per\n> > https://github.com/ned14/nedmalloc/issues/20#issuecomment-343432314,\n> > there is also no hope that any fixes will materialize there.\n> \n> This kind of raises the question whether we want to keep on maintaining\n> nedmalloc in our codebase at all. Is there any strong reason to have it?\n\nTo the contrary, There is a very strong reason to drop it: nedmalloc is\nunmaintained.\n\nThere is just a teeny tiny blocker before it can be dropped, though:\n\n$ git grep -n USE_NED_ALLOCATOR upstream/master -- ':(exclude)Makefile'\nupstream/master:config.mak.uname:478:   # USE_NED_ALLOCATOR = YesPlease\nupstream/master:config.mak.uname:741:   USE_NED_ALLOCATOR = YesPlease\nupstream/master:contrib/buildsystems/CMakeLists.txt:258:                                USE_NED_ALLOCATOR OVERRIDE_STRDUP MMAP_PREVENTS_DELETE USE_WIN32_MMAP\n\nThe commented-out one is the MSVC build (I had experimental Git for\nWindows patches to enable nedmalloc even in MSVC builds, which I abandoned\nin favor of https://github.com/git-for-windows/git/pull/4580 to enable\nmimalloc in MSVC builds, but I abandoned that effort, too, because Git\ndecided to favor Meson over first-class MSVC support and I decided to\nfocus on avoiding to have my time wasted by the Git project).\n\nAs you are quite aware (because it caused plenty of trouble with your\nreftable patch series), Git for Windows switched to mimalloc quite a while\nago (https://github.com/microsoft/mimalloc).\n\nWhen I switched Git for Windows to mimalloc, I did (re-)run a couple of\nperformance tests to see whether having a custom allocator is still\nnecessary, and from my (unfortunately too vague) recollection, Windows\n11's default allocator seems to have performed quite well in comparison.\nWhich is in stark contrast to the results of the performance tests I ran\nwhen originally integrating nedmalloc. So: In theory, Git for Windows\ncould drop building with a custom allocator, iff it wasn't for older\nWindows version that are still supported.\n\nWhich means that I would like to upstream the vendored-in mimalloc first,\nwith the patch to use it when building on Windows by default, before\ndropping nedmalloc from Git's source code.\n\nCiao,\nJohannes\n"},{"id":"516571","messageId":"pull.1904.v2.git.1745395308.gitgitgadget@gmail.com","threadId":"63320","inReplyTo":"pull.1904.git.1745239150.gitgitgadget@gmail.com","subject":"[PATCH v2 0/6] Support Windows/ARM64","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-04-23T08:01:42Z","receivedAt":"2025-04-23T08:01:52Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Git for Windows has started building artifacts for Windows/ARM64 since\nv2.47.1 (November 25th 2024). Now that Windows/ARM64 GitHub Action runners\nare available in public preview\n[https://github.blog/changelog/2025-04-14-windows-arm64-hosted-runners-now-available-in-public-preview/]\nat long last, it is high time to upstream the minimal set of patches to\nbuild Git on Windows/ARM64 and pass the test suite.\n\nChanges since v1:\n\n * Replaced an #else #if construct by an #elif one.\n\nDennis Ameling (2):\n  bswap.h: add support for built-in bswap functions\n  config.mak.uname: add support for clangarm64\n\nJohannes Schindelin (4):\n  mingw: do not use nedmalloc on Windows/ARM64\n  msvc: do handle builds on Windows/ARM64\n  mingw(arm64): do move the `/etc/git*` location\n  max_tree_depth: lower it for clangarm64 on Windows\n\n compat/bswap.h   | 14 +++++++++++++-\n config.mak.uname | 18 ++++++++++++++----\n environment.c    | 10 ++++++++++\n 3 files changed, 37 insertions(+), 5 deletions(-)\n\n\nbase-commit: 683c54c999c301c2cd6f715c411407c413b1d84e\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1904%2Fdscho%2Fsupport-clangarm64-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1904/dscho/support-clangarm64-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/1904\n\nRange-diff vs v1:\n\n 1:  b89f39cbac6 = 1:  b89f39cbac6 bswap.h: add support for built-in bswap functions\n 2:  2feeadb0d3f = 2:  2feeadb0d3f config.mak.uname: add support for clangarm64\n 3:  6c2e17eca68 = 3:  6c2e17eca68 mingw: do not use nedmalloc on Windows/ARM64\n 4:  c89ead8eaba = 4:  c89ead8eaba msvc: do handle builds on Windows/ARM64\n 5:  939bcb0dc63 = 5:  939bcb0dc63 mingw(arm64): do move the `/etc/git*` location\n 6:  6ebc3ef57fd ! 6:  e0e78bd5131 max_tree_depth: lower it for clangarm64 on Windows\n     @@ environment.c: int max_allowed_tree_depth =\n       \t * the stack overflow can occur.\n       \t */\n       \t512;\n     -+#else\n     -+#if defined(GIT_WINDOWS_NATIVE) && defined(__clang__) && defined(__aarch64__)\n     ++#elif defined(GIT_WINDOWS_NATIVE) && defined(__clang__) && defined(__aarch64__)\n      +\t/*\n      +\t * Similar to Visual C, it seems that on Windows/ARM64 the clang-based\n      +\t * builds have a smaller stack space available. When running out of\n     @@ environment.c: int max_allowed_tree_depth =\n       #else\n       \t2048;\n       #endif\n     -+#endif\n     - \n     - #ifndef PROTECT_HFS_DEFAULT\n     - #define PROTECT_HFS_DEFAULT 0\n\n-- \ngitgitgadget\n"},{"id":"516572","messageId":"b89f39cbac6abb23ce1f6a987dc864181af2f395.1745395308.git.gitgitgadget@gmail.com","threadId":"63320","inReplyTo":"pull.1904.v2.git.1745395308.gitgitgadget@gmail.com","subject":"[PATCH v2 1/6] bswap.h: add support for built-in bswap functions","fromName":"Dennis Ameling via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-04-23T08:01:43Z","receivedAt":"2025-04-23T08:01:53Z","isPatch":true,"sender":{"key":"name:Dennis Ameling","avatar":null},"body":"From: Dennis Ameling <dennis@dennisameling.com>\n\nNewer compiler versions, like GCC 10 and Clang 12, have built-in\nfunctions for bswap32 and bswap64. This comes in handy, for example,\nwhen targeting CLANGARM64 on Windows, which would not be supported\nwithout this logic.\n\nSigned-off-by: Dennis Ameling <dennis@dennisameling.com>\n---\n compat/bswap.h | 14 +++++++++++++-\n 1 file changed, 13 insertions(+), 1 deletion(-)\n\ndiff --git a/compat/bswap.h b/compat/bswap.h\nindex b34054f2bd7..9e0f98e00b9 100644\n--- a/compat/bswap.h\n+++ b/compat/bswap.h\n@@ -35,7 +35,19 @@ static inline uint64_t default_bswap64(uint64_t val)\n #undef bswap32\n #undef bswap64\n \n-#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))\n+/**\n+ * __has_builtin is available since Clang 10 and GCC 10.\n+ * Below is a fallback for older compilers.\n+ */\n+#ifndef __has_builtin\n+\t#define __has_builtin(x) 0\n+#endif\n+\n+#if __has_builtin(__builtin_bswap32) && __has_builtin(__builtin_bswap64)\n+#define bswap32(x) __builtin_bswap32((x))\n+#define bswap64(x) __builtin_bswap64((x))\n+\n+#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))\n \n #define bswap32 git_bswap32\n static inline uint32_t git_bswap32(uint32_t x)\n-- \ngitgitgadget\n\n"},{"id":"516573","messageId":"2feeadb0d3fb7a631489e36d861d112d46423f2a.1745395308.git.gitgitgadget@gmail.com","threadId":"63320","inReplyTo":"pull.1904.v2.git.1745395308.gitgitgadget@gmail.com","subject":"[PATCH v2 2/6] config.mak.uname: add support for clangarm64","fromName":"Dennis Ameling via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-04-23T08:01:44Z","receivedAt":"2025-04-23T08:01:54Z","isPatch":true,"sender":{"key":"name:Dennis Ameling","avatar":null},"body":"From: Dennis Ameling <dennis@dennisameling.com>\n\nCLANGARM64 is a relatively new MSYSTEM added by the MSYS2 team. In order\nto have Git build correctly for this platform, let's add some\nconfiguration for it to config.mak.uname.\n\nSigned-off-by: Dennis Ameling <dennis@dennisameling.com>\n---\n config.mak.uname | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex b12d4e168ae..1e5d89f1aa4 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -724,6 +724,10 @@ ifeq ($(uname_S),MINGW)\n \t\tprefix = /mingw64\n \t\tHOST_CPU = x86_64\n \t\tBASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup\n+        else ifeq (CLANGARM64,$(MSYSTEM))\n+\t\tprefix = /clangarm64\n+\t\tHOST_CPU = aarch64\n+\t\tBASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup\n         else\n \t\tCOMPAT_CFLAGS += -D_USE_32BIT_TIME_T\n \t\tBASIC_LDFLAGS += -Wl,--large-address-aware\n-- \ngitgitgadget\n\n"},{"id":"516574","messageId":"6c2e17eca68b143eff7b33d195bc66a486471547.1745395308.git.gitgitgadget@gmail.com","threadId":"63320","inReplyTo":"pull.1904.v2.git.1745395308.gitgitgadget@gmail.com","subject":"[PATCH v2 3/6] mingw: do not use nedmalloc on Windows/ARM64","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-04-23T08:01:45Z","receivedAt":"2025-04-23T08:01:55Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIt does not compile there, and seeing as nedmalloc has been pretty much\nunmaintained since at least November 2017, as per\nhttps://github.com/ned14/nedmalloc/issues/20#issuecomment-343432314,\nthere is also no hope that any fixes will materialize there.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n config.mak.uname | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 1e5d89f1aa4..6222d2c5a48 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -742,7 +742,9 @@ ifeq ($(uname_S),MINGW)\n \tHAVE_LIBCHARSET_H = YesPlease\n \tUSE_GETTEXT_SCHEME = fallthrough\n \tUSE_LIBPCRE = YesPlease\n-\tUSE_NED_ALLOCATOR = YesPlease\n+\tifneq (CLANGARM64,$(MSYSTEM))\n+\t\tUSE_NED_ALLOCATOR = YesPlease\n+\tendif\n         ifeq (/mingw64,$(subst 32,64,$(prefix)))\n \t\t# Move system config into top-level /etc/\n \t\tETC_GITCONFIG = ../etc/gitconfig\n-- \ngitgitgadget\n\n"},{"id":"516575","messageId":"c89ead8eaba7f824d6a4828964f8384f60b17101.1745395308.git.gitgitgadget@gmail.com","threadId":"63320","inReplyTo":"pull.1904.v2.git.1745395308.gitgitgadget@gmail.com","subject":"[PATCH v2 4/6] msvc: do handle builds on Windows/ARM64","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-04-23T08:01:46Z","receivedAt":"2025-04-23T08:01:56Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nGit for Windows/ARM64 settled on using `clang` to compile `git.exe`, and\nhence needs to run in a system where `MSYSTEM` is set to `CLANGARM64`\nand the prefix to use is `/clangarm64`.\n\nWe already did that in the `MINGW` arm, i.e. for regular Git for Windows\nbuilds using MINGW GCC (or `clang`'s shim pretending to be GCC), now it\nis time to do the same in the MS Visual C part.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n config.mak.uname | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 6222d2c5a48..bd94f458088 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -432,7 +432,11 @@ ifeq ($(uname_S),Windows)\n         ifeq (MINGW32,$(MSYSTEM))\n \t\tprefix = /mingw32\n         else\n-\t\tprefix = /mingw64\n+\t\tifeq (CLANGARM64,$(MSYSTEM))\n+\t\t\tprefix = /clangarm64\n+\t\telse\n+\t\t\tprefix = /mingw64\n+\t\tendif\n         endif\n \t# Prepend MSVC 64-bit tool-chain to PATH.\n \t#\n-- \ngitgitgadget\n\n"},{"id":"516576","messageId":"939bcb0dc63f7f9dff71588182c7f384341f8432.1745395308.git.gitgitgadget@gmail.com","threadId":"63320","inReplyTo":"pull.1904.v2.git.1745395308.gitgitgadget@gmail.com","subject":"[PATCH v2 5/6] mingw(arm64): do move the `/etc/git*` location","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-04-23T08:01:47Z","receivedAt":"2025-04-23T08:01:57Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn fb5e3378f8 (mingw: move Git for Windows' system config where users\nexpect it, 2021-06-22), I moved the location of Git for Windows' system\nconfig and system Git attributes file to the top-level `/etc/` directory\n(because it is a much more obvious location than, say, `/mingw64/etc/`).\n\nThe patch relied on a very specific scenario that the newly-supported\nWindows/ARM64 builds of `git.exe` fails to fall into. So let's broaden\nthe condition a bit, so that Windows/ARM64 builds also use that location\n(instead of the even more obscure `/clangarm64/etc/` directory).\n\nThis fixes https://github.com/git-for-windows/git/issues/5431.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n config.mak.uname | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex bd94f458088..9a95ba8c9ab 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -489,7 +489,7 @@ ifeq ($(uname_S),Windows)\n \tNO_POSIX_GOODIES = UnfortunatelyYes\n \tNATIVE_CRLF = YesPlease\n \tDEFAULT_HELP_FORMAT = html\n-ifeq (/mingw64,$(subst 32,64,$(prefix)))\n+ifeq (/mingw64,$(subst 32,64,$(subst clangarm,mingw,$(prefix))))\n \t# Move system config into top-level /etc/\n \tETC_GITCONFIG = ../etc/gitconfig\n \tETC_GITATTRIBUTES = ../etc/gitattributes\n@@ -749,7 +749,7 @@ ifeq ($(uname_S),MINGW)\n \tifneq (CLANGARM64,$(MSYSTEM))\n \t\tUSE_NED_ALLOCATOR = YesPlease\n \tendif\n-        ifeq (/mingw64,$(subst 32,64,$(prefix)))\n+        ifeq (/mingw64,$(subst 32,64,$(subst clangarm,mingw,$(prefix))))\n \t\t# Move system config into top-level /etc/\n \t\tETC_GITCONFIG = ../etc/gitconfig\n \t\tETC_GITATTRIBUTES = ../etc/gitattributes\n-- \ngitgitgadget\n\n"},{"id":"516577","messageId":"e0e78bd5131a9efa64697cd7c0bd30965d13b41c.1745395308.git.gitgitgadget@gmail.com","threadId":"63320","inReplyTo":"pull.1904.v2.git.1745395308.gitgitgadget@gmail.com","subject":"[PATCH v2 6/6] max_tree_depth: lower it for clangarm64 on Windows","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-04-23T08:01:48Z","receivedAt":"2025-04-23T08:01:58Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nJust as in b64d78ad02ca (max_tree_depth: lower it for MSVC to avoid\nstack overflows, 2023-11-01), I encountered the same problem with the\nclang builds on Windows/ARM64.\n\nThe symptom is an exit code 127 when t6700 tries to verify that `git\narchive big` fails.\n\nThis exit code is reserved on Unix/Linux to mean \"command not found\".\nUnfortunately in this case, it is the fall-back chosen by\nCygwin's `pinfo::status_exit()` method when encountering\nthe NSTATUS `STATUS_STACK_OVERFLOW`, see\nhttps://github.com/cygwin/cygwin/blob/cygwin-3.6.1/winsup/cygwin/pinfo.cc#L171\n\nI verified manually that the stack overflow always happens somewhere\naround tree depth 1403, therefore 1280 should be a safe bound in these\ninstances.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n environment.c | 10 ++++++++++\n 1 file changed, 10 insertions(+)\n\ndiff --git a/environment.c b/environment.c\nindex 9e4c7781be0..d948bb3c705 100644\n--- a/environment.c\n+++ b/environment.c\n@@ -82,6 +82,16 @@ int max_allowed_tree_depth =\n \t * the stack overflow can occur.\n \t */\n \t512;\n+#elif defined(GIT_WINDOWS_NATIVE) && defined(__clang__) && defined(__aarch64__)\n+\t/*\n+\t * Similar to Visual C, it seems that on Windows/ARM64 the clang-based\n+\t * builds have a smaller stack space available. When running out of\n+\t * that stack space, a `STATUS_STACK_OVERFLOW` is produced. When the\n+\t * Git command was run from an MSYS2 Bash, this unfortunately results\n+\t * in an exit code 127. Let's prevent that by lowering the maximal\n+\t * tree depth; This value seems to be low enough.\n+\t */\n+\t1280;\n #else\n \t2048;\n #endif\n-- \ngitgitgadget\n"},{"id":"516611","messageId":"xmqqy0vqzw7e.fsf@gitster.g","threadId":"63320","inReplyTo":"6c2e17eca68b143eff7b33d195bc66a486471547.1745395308.git.gitgitgadget@gmail.com","subject":"Re: [PATCH v2 3/6] mingw: do not use nedmalloc on Windows/ARM64","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-04-23T16:20:05Z","receivedAt":"2025-04-23T16:20:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> -\tUSE_NED_ALLOCATOR = YesPlease\n> +\tifneq (CLANGARM64,$(MSYSTEM))\n> +\t\tUSE_NED_ALLOCATOR = YesPlease\n> +\tendif\n>          ifeq (/mingw64,$(subst 32,64,$(prefix)))\n\nNotice the funny indentation above?  It turns out that the one in\nthe context that looks funnily indented uses the \"correct\"\nindentation, which is quite counter-intuitive and confusing X-<.\n\nI forgot about the rule while reviewing the previous round, but we\nhad to prepare for newer GNU make with commits like c18400c6\n(Makefile(s): avoid recipe prefix in conditional statements,\n2024-04-08).  In short, the conditionals like ifn?eq, ifn?def, else,\nendif should not be indented with HT and we instead want them to be\nindented with SP.\n\n    $ git diff master... config.mak.uname |\n      grep -E -e '^[+]       +(ifn?eq|ifn?def|else|endif)'\n\nfound them in a few patches in the series that touch\nconfig.mak.uname\n\n    msvc: do handle builds on Windows/ARM64\n    mingw: do not use nedmalloc on Windows/ARM64\n\nFix-up for \"mingw: do not use nedmalloc on Windows/ARM64\"\n\n config.mak.uname | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git c/config.mak.uname w/config.mak.uname\nindex 6222d2c5a4..3ec82d95e6 100644\n--- c/config.mak.uname\n+++ w/config.mak.uname\n@@ -742,9 +742,9 @@ ifeq ($(uname_S),MINGW)\n \tHAVE_LIBCHARSET_H = YesPlease\n \tUSE_GETTEXT_SCHEME = fallthrough\n \tUSE_LIBPCRE = YesPlease\n-\tifneq (CLANGARM64,$(MSYSTEM))\n+        ifneq (CLANGARM64,$(MSYSTEM))\n \t\tUSE_NED_ALLOCATOR = YesPlease\n-\tendif\n+        endif\n         ifeq (/mingw64,$(subst 32,64,$(prefix)))\n \t\t# Move system config into top-level /etc/\n \t\tETC_GITCONFIG = ../etc/gitconfig\n\n\nFix-up for \"msvc: do handle builds on Windows/ARM64\"\n    \n config.mak.uname | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git c/config.mak.uname w/config.mak.uname\nindex 4831e9ccf6..4ef453ebcd 100644\n--- c/config.mak.uname\n+++ w/config.mak.uname\n@@ -432,11 +432,11 @@ ifeq ($(uname_S),Windows)\n         ifeq (MINGW32,$(MSYSTEM))\n \t\tprefix = /mingw32\n         else\n-\t\tifeq (CLANGARM64,$(MSYSTEM))\n+                ifeq (CLANGARM64,$(MSYSTEM))\n \t\t\tprefix = /clangarm64\n-\t\telse\n+                else\n \t\t\tprefix = /mingw64\n-\t\tendif\n+                endif\n         endif\n \t# Prepend MSVC 64-bit tool-chain to PATH.\n \t#\n\nTaken as a whole, here is a range-diff of what I will queue based on\nthis iteration.\n\nThanks.\n\n1:  da1408a34e ! 1:  734bf24007 mingw: do not use nedmalloc on Windows/ARM64\n    @@ Commit message\n         there is also no hope that any fixes will materialize there.\n     \n         Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n    +    [jc: adjust config.mak.uname for c18400c6]\n         Signed-off-by: Junio C Hamano <gitster@pobox.com>\n     \n      ## config.mak.uname ##\n    @@ config.mak.uname: ifeq ($(uname_S),MINGW)\n      \tUSE_GETTEXT_SCHEME = fallthrough\n      \tUSE_LIBPCRE = YesPlease\n     -\tUSE_NED_ALLOCATOR = YesPlease\n    -+\tifneq (CLANGARM64,$(MSYSTEM))\n    ++        ifneq (CLANGARM64,$(MSYSTEM))\n     +\t\tUSE_NED_ALLOCATOR = YesPlease\n    -+\tendif\n    ++        endif\n              ifeq (/mingw64,$(subst 32,64,$(prefix)))\n      \t\t# Move system config into top-level /etc/\n      \t\tETC_GITCONFIG = ../etc/gitconfig\n2:  e27caa3dca ! 2:  8945fba590 msvc: do handle builds on Windows/ARM64\n    @@ Commit message\n         is time to do the same in the MS Visual C part.\n     \n         Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n    +    [jc: adjust config.mak.uname for c18400c6]\n         Signed-off-by: Junio C Hamano <gitster@pobox.com>\n     \n      ## config.mak.uname ##\n    @@ config.mak.uname: ifeq ($(uname_S),Windows)\n      \t\tprefix = /mingw32\n              else\n     -\t\tprefix = /mingw64\n    -+\t\tifeq (CLANGARM64,$(MSYSTEM))\n    ++                ifeq (CLANGARM64,$(MSYSTEM))\n     +\t\t\tprefix = /clangarm64\n    -+\t\telse\n    ++                else\n     +\t\t\tprefix = /mingw64\n    -+\t\tendif\n    ++                endif\n              endif\n      \t# Prepend MSVC 64-bit tool-chain to PATH.\n      \t#\n3:  f1f6c1f2fa ! 3:  619950d421 mingw(arm64): do move the `/etc/git*` location\n    @@ config.mak.uname: ifeq ($(uname_S),Windows)\n      \tETC_GITCONFIG = ../etc/gitconfig\n      \tETC_GITATTRIBUTES = ../etc/gitattributes\n     @@ config.mak.uname: ifeq ($(uname_S),MINGW)\n    - \tifneq (CLANGARM64,$(MSYSTEM))\n    +         ifneq (CLANGARM64,$(MSYSTEM))\n      \t\tUSE_NED_ALLOCATOR = YesPlease\n    - \tendif\n    +         endif\n     -        ifeq (/mingw64,$(subst 32,64,$(prefix)))\n     +        ifeq (/mingw64,$(subst 32,64,$(subst clangarm,mingw,$(prefix))))\n      \t\t# Move system config into top-level /etc/\n4:  687bd4ea96 = 4:  436a42215e max_tree_depth: lower it for clangarm64 on Windows\n"}]}