mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Simplest fix to bug2402: do not include SVN versions
When we stopped using svn, 0.2.1.x lost the ability to notice its svn revision and report it in the version number. However, it kept looking at the micro-revision.i file... so if you switched to master, built tor, then switched to 0.2.1.x, you'd get a micro-revision.i file from master reported as an SVN tag. This patch takes out the "include the svn tag" logic entirely. Bugfix on 0.2.1.15-rc; fixes bug 2402.
This commit is contained in:
parent
ef6fa07e48
commit
a1073ee956
4
changes/bug2402
Normal file
4
changes/bug2402
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
o Minor bugfixes (build)
|
||||||
|
- Do not include Git version tags as though they were SVN tags when
|
||||||
|
generating a tarball from inside a repository that has switched between
|
||||||
|
branches. Bugfix on 0.2.1.15-rc; fixes bug 2402.
|
@ -827,16 +827,7 @@ static char *_version = NULL;
|
|||||||
const char *
|
const char *
|
||||||
get_version(void)
|
get_version(void)
|
||||||
{
|
{
|
||||||
if (_version == NULL) {
|
return VERSION;
|
||||||
if (strlen(tor_svn_revision)) {
|
|
||||||
size_t len = strlen(VERSION)+strlen(tor_svn_revision)+8;
|
|
||||||
_version = tor_malloc(len);
|
|
||||||
tor_snprintf(_version, len, "%s (r%s)", VERSION, tor_svn_revision);
|
|
||||||
} else {
|
|
||||||
_version = tor_strdup(VERSION);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return _version;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Release additional memory allocated in options
|
/** Release additional memory allocated in options
|
||||||
|
Loading…
Reference in New Issue
Block a user