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 2.9.3.windows.2.826.g06c0f2f cpu: x86_64 sizeof-long: 4 New Makefile variable HOST_CPU supports cross-compiling. Suggested-by: Adric Norris <landstander668@gmail.com> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
52015aaf9d
commit
b22894049f
1
help.c
1
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? */
|
||||
}
|
||||
|
Reference in New Issue
Block a user