Skip to content

Commit 6c6ab27

Browse files
committed
Fix the mis-prefixing of the git version info with 'r', which applies only to Subversion.
1 parent cf15ce9 commit 6c6ab27

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

platforms/Cross/vm/sqSCCSVersion.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "../plugins/sqPluginsSCCSVersion.h"
2828

2929
#if SUBVERSION
30+
# define PREFIX "r"
3031
static char SvnRawRevisionString[] = "$Rev$";
3132
# define REV_START (SvnRawRevisionString + 6)
3233

@@ -65,6 +66,7 @@ repositoryURL()
6566
# undef REV_START
6667
# undef URL_START
6768
#elif GIT
69+
# define PREFIX ""
6870
static char GitRawRevisionString[] = "$Rev$";
6971
# define REV_START (GitRawRevisionString + 6)
7072

@@ -103,6 +105,7 @@ repositoryURL()
103105
# undef REV_START
104106
# undef URL_START
105107
#else /* SUBVERSION */
108+
# define PREFIX ""
106109
char *
107110
revisionAsString() { return "?"; }
108111

@@ -117,7 +120,7 @@ sourceVersionString(char separator)
117120
{
118121
if (!sourceVersion) {
119122
#if 1 /* a) mingw32 doesn't have asprintf and b) on Mac OS it segfaults. */
120-
char *fmt = "VM: r%s %s Date: %s%cPlugins: r%s %s";
123+
char *fmt = "VM: " PREFIX "%s %s Date: %s%cPlugins: " PREFIX "%s %s";
121124
int len = strlen(fmt)
122125
+ strlen(revisionAsString())
123126
+ strlen(repositoryURL())
@@ -130,7 +133,8 @@ sourceVersionString(char separator)
130133
separator,
131134
pluginsRevisionAsString(), pluginsRepositoryURL());
132135
#else
133-
asprintf(&sourceVersion, "VM: r%s %s Date: %s%cPlugins: r%s %s",
136+
asprintf(&sourceVersion,
137+
"VM: " PREFIX "%s %s Date: %s%cPlugins: " PREFIX "%s %s",
134138
revisionAsString(), repositoryURL(), revisionDateAsString(),
135139
separator,
136140
pluginsRevisionAsString(), pluginsRepositoryURL());

0 commit comments

Comments
 (0)