diff --git a/help.c b/help.c index 6d2ebfbd2a45f1..9f2ceaa81c24a8 100644 --- a/help.c +++ b/help.c @@ -730,6 +730,22 @@ const char *help_unknown_cmd(const char *cmd) exit(1); } +#if defined(__APPLE__) +static const char *git_host_cpu(void) { + if (!strcmp(GIT_HOST_CPU, "universal")) { +#if defined(__x86_64__) + return "x86_64"; +#elif defined(__aarch64__) + return "arm64"; +#endif + } + + return GIT_HOST_CPU; +} +#undef GIT_HOST_CPU +#define GIT_HOST_CPU git_host_cpu() +#endif + void get_version_info(struct strbuf *buf, int show_build_options) { /*