Skip to content

macOS arm64 release expands 145 Git symlinks into executables, adding ~495 MiB #23236

In progress

Description

@hewigovens

The problem

The official GitHub Desktop 3.6.11 release for Apple silicon replaces 145 Git command symlinks with separate executable files. In the bundled Git distribution, commands such as git-add and git-commit are symlinks to git. In the Desktop release ZIP, those same 145 paths are regular files totaling 494.7 MiB uncompressed.

The entire app bundle is 1.09 GiB uncompressed, so these files account for about 44% of it. Could the macOS packaging step preserve these relative links so the commands continue to share one executable in the signed app?

Release version

3.6.11

Operating system

macOS 27.2.1

Steps to reproduce the behavior

Download the official Desktop release and its corresponding Dugite Native package. The comparison can be done directly on the archives:

curl -fL -o desktop.zip https://github.com/desktop/desktop/releases/download/release-3.6.11/GitHub.Desktop-arm64.zip
curl -fL -o dugite.tar.gz https://github.com/desktop/dugite-native/releases/download/v2.56.1/dugite-native-v2.56.1-238326e-macOS-arm64.tar.gz

tar -tvzf dugite.tar.gz | grep -E '/git-(add|commit) ->'
zipinfo -l desktop.zip '*/git-core/git-add' '*/git-core/git-commit'

The Dugite archive shows git-add -> git and git-commit -> git. The Desktop ZIP lists git-add and git-commit as regular executable files of 3,577,168 and 3,577,184 bytes, respectively. Comparing all 145 symlinks to git under Dugite’s libexec/git-core gives the same result for every one.

Log files

No response

Screenshots

No response

Additional context

The 3.6.11 packaging configuration sets derefSymlinks: true.

Activity

  1. added
    bug
    priority-3
    on Nov 26, 2026
  2. desktop-triage commented on Nov 26, 2026

    @desktop-triage

    Triage summary: This is a confirmed packaging/build issue rather than a runtime bug: the reporter provides reproducible evidence (archive comparisons showing 145 regular files vs. symlinks, byte counts, and the exact config line) that electron-packager's derefSymlinks: true option is expanding Git's symlinked commands into full copies during macOS packaging. I'm requesting bug (HIGH confidence — clear, verifiable packaging defect with reproduction steps) and priority-3 (MEDIUM confidence — bloats app size but doesn't break core functionality or affect correctness; a workaround of manually re-linking post-build is possible, though not user-friendly). No duplicates were found in a search of desktop/desktop issues for symlink/packaging-size related reports.

    Initial hypothesis

    The derefSymlinks: true option passed to the packager() call in script/build.ts, line 216 instructs @electron/packager to resolve (dereference) symlinks during the copy step, rather than preserving them. Since Dugite's bundled Git distribution implements the ~145 git-core subcommands (e.g. git-add, git-commit) as symlinks to a single git binary, this option causes each of those symlinks to be replaced with a full physical copy of the ~3.4 MB git executable when the app bundle is assembled, accounting for the reported ~495 MiB of bloat. This is distinct from the unrelated copy helpers in the same file (copyDependencies, copyStaticResources, etc.), which already use verbatimSymlinks: true to preserve symlinks for other bundled resources — derefSymlinks is a separate, packager-level setting that applies to the whole app directory tree being packaged, including the Git distribution. If derefSymlinks was originally added to handle some other symlink scenario (e.g., node_modules or electron binaries) rather than Git's git-core folder specifically, switching it to false (combined with verbatimSymlinks-style preservation for packaged output) or excluding git-core's internal symlinks from dereferencing could resolve the bloat, but the original rationale for enabling this flag should be confirmed before changing it, since it may have been needed for macOS code-signing/notarization of certain files.

    Generated by Issue Triage (skills-driven) for #23236 · auto · 32.9 AIC · ⊞ 4.7K · ◷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority-3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions