]> granicus.if.org Git - nethack/commitdiff
suppress version branch info if not BETA
authornhmall <nhmall@nethack.org>
Wed, 25 Apr 2018 21:56:14 +0000 (17:56 -0400)
committernhmall <nhmall@nethack.org>
Wed, 25 Apr 2018 21:56:14 +0000 (17:56 -0400)
I think this is needed to avoid inevitable questions/confusion.

Having the git hash in the version string of official binaries
is a very good thing, however.

src/version.c

index b5fdf3ba52254ea9c648fd0e241f52122620e30c..5055e8df6cfd1c49ff03b260403ca757550ad375 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 version.c       $NHDT-Date: 1519155525 2018/02/20 19:38:45 $  $NHDT-Branch: githash $:$NHDT-Revision: 1.47 $ */
+/* NetHack 3.6 version.c       $NHDT-Date: 1524693365 2018/04/25 21:56:05 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.49 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Michael Allison, 2018. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -66,8 +66,10 @@ char *buf;
             Sprintf(eos(buf), "%s%s", c++ ? "," : "", NetHack_git_sha);
 #endif
 #if defined(NETHACK_GIT_BRANCH)
+#if defined(BETA)
         if (NetHack_git_branch)
-            Sprintf(eos(buf), "%s%s", c++ ? "," : "", NetHack_git_branch);
+            Sprintf(eos(buf), "%sbranch:%s", c++ ? "," : "", NetHack_git_branch);
+#endif
 #endif
         Sprintf(eos(buf), ")");
     }