From 059eab3e7efb2e2100f193226aebd6df5b88e7b7 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 3 Feb 2021 19:37:44 +0200 Subject: [PATCH 13/13] Show git revision also in beta mode The version number can get quite long with both beta notice and git revision included, but that's what user has explicitly chosen when giving --enable-gitrev. See osdn #41452 Signed-off-by: Marko Lindqvist --- common/version.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/version.c b/common/version.c index c0d8412eb4..82ddeda561 100644 --- a/common/version.c +++ b/common/version.c @@ -37,8 +37,14 @@ const char *freeciv_name_version(void) static char msgbuf[256]; #if IS_BETA_VERSION +#if defined(GITREV) && !defined(FC_GITREV_OFF) + fc_snprintf(msgbuf, sizeof (msgbuf), _("Freeciv version %s %s (%s)"), + VERSION_STRING, _("(beta version)"), + fc_git_revision()); +#else fc_snprintf(msgbuf, sizeof (msgbuf), _("Freeciv version %s %s"), VERSION_STRING, _("(beta version)")); +#endif #elif defined(GITREV) && !defined(FC_GITREV_OFF) fc_snprintf(msgbuf, sizeof (msgbuf), _("Freeciv version %s (%s)"), VERSION_STRING, fc_git_revision()); -- 2.30.0