path: root/help.c
diff options
authorEric Sunshine <>2017-12-14 23:34:34 (GMT)
committerJunio C Hamano <>2017-12-15 06:52:49 (GMT)
commitb22894049ffed57eb150ad156796e3eda86259c9 (patch)
tree03c4036da578bdf166baf96ba9b506a5ff9c80f4 /help.c
parent52015aaf9d19c97b52c47c7046058e6d029ff856 (diff)
version --build-options: also report host CPU
It can be helpful for bug reports to include information about the environment in which the bug occurs. "git version --build-options" can help to supplement this information. In addition to the size of 'long' already reported by --build-options, also report the host's CPU type. Example output: $ git version --build-options git version cpu: x86_64 sizeof-long: 4 New Makefile variable HOST_CPU supports cross-compiling. Suggested-by: Adric Norris <> Signed-off-by: Eric Sunshine <> Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'help.c')
1 files changed, 1 insertions, 0 deletions
diff --git a/help.c b/help.c
index 88a3aea..cbcb159 100644
--- a/help.c
+++ b/help.c
@@ -412,6 +412,7 @@ int cmd_version(int argc, const char **argv, const char *prefix)
printf("git version %s\n", git_version_string);
if (build_options) {
+ printf("cpu: %s\n", GIT_HOST_CPU);
printf("sizeof-long: %d\n", (int)sizeof(long));
/* NEEDSWORK: also save and output GIT-BUILD_OPTIONS? */