Skip to content

fix: support Windows ARM64 (clangarm64) in install.cmd#1259

Open
AchoArnold wants to merge 3 commits into
tj:mainfrom
AchoArnold:fix/windows-arm64-install
Open

fix: support Windows ARM64 (clangarm64) in install.cmd#1259
AchoArnold wants to merge 3 commits into
tj:mainfrom
AchoArnold:fix/windows-arm64-install

Conversation

@AchoArnold

Copy link
Copy Markdown

Problem

Git for Windows on ARM64 uses a clangarm64 directory instead of mingw64. Running install.cmd on an ARM64 Windows machine fails with:

No mingw64 folder found in C:\Program Files\Git.

Solution

Updated install.cmd to auto-detect clangarm64 when mingw64 is not present. The changes cover all four places where the script resolves the target directory:

  1. Auto-detection from PATH — checks for clangarm64 if mingw64 doesn't exist
  2. Default path fallback — same auto-detection for %ProgramFiles%\Git
  3. User-supplied path — recognizes clangarm64 in user-provided install paths
  4. Validation check — accepts either mingw64 or clangarm64

When both directories exist, mingw64 is preferred to preserve existing behavior on x86/x64 systems.

Testing

Tested on Windows 11 ARM64 with Git for Windows 2.54.0 (clangarm64 layout). The installer now correctly detects and installs to C:\Program Files\Git\clangarm64 without requiring the user to manually supply the path.

AchoArnold and others added 2 commits June 18, 2026 00:09
Git for Windows on ARM64 uses a `clangarm64` directory instead of
`mingw64`. The installer now auto-detects `clangarm64` when
`mingw64` is not present, so it works out of the box on ARM64
Windows machines without requiring the user to manually supply
the path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates install.cmd to support Git for Windows on ARM64, where the installation uses a clangarm64 directory layout instead of mingw64, by detecting and accepting either directory when resolving the install prefix.

Changes:

  • Extend prefix auto-detection to fall back to clangarm64 when mingw64 is not present.
  • Update default install path logic (%ProgramFiles%\Git) to detect clangarm64.
  • Update install path validation to accept either mingw64 or clangarm64.
Comments suppressed due to low confidence (1)

install.cmd:75

  • The user guidance still says the supplied path should point to the mingw64 directory, but the script now also supports clangarm64. This can confuse ARM64 users who hit the fallback path handling.
        echo Using git install path "%~1" as PREFIX, please make sure it's really a
        echo path to the mingw64 directory...
        echo.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread install.cmd

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread install.cmd Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread install.cmd
Comment on lines +42 to +48
if exist "%installdir%mingw64" (
set PREFIX=%installdir%mingw64
) else if exist "%installdir%clangarm64" (
set PREFIX=%installdir%clangarm64
) else (
set PREFIX=%installdir%mingw64
)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread install.cmd
Comment on lines 41 to +45
for %%G in ("%bindir%") do set installdir=%%~dpG
set PREFIX=%installdir%mingw64
if exist "%installdir%mingw64" (
set PREFIX=%installdir%mingw64
) else if exist "%installdir%clangarm64" (
set PREFIX=%installdir%clangarm64
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.

2 participants