summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-06-12 13:38:37 -0400
committerNick Mathewson <nickm@torproject.org>2009-08-21 12:31:13 -0400
commitdaa0326aaaa85a760be94ee2360cfa61a9fb5be2 (patch)
treedb6484f8eb65fd7cfc02af66f681b21f9cff41b4 /src/or/config.c
parent978571587a85bebb37ec3cb9c2ea1fde1cecd6d7 (diff)
downloadtor-daa0326aaaa85a760be94ee2360cfa61a9fb5be2.tar.gz
tor-daa0326aaaa85a760be94ee2360cfa61a9fb5be2.zip
Add the first 8 bytes of the git commit digest to our versions.
Note that unlike subversion revision numbers, it isn't meaningful to compare these for anything but equality. We define a sort-order anyway, in case one of these accidentally slips into a recommended-versions list.
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/config.c b/src/or/config.c
index de6bfcf680..43f88e537e 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -817,7 +817,7 @@ set_options(or_options_t *new_val, char **msg)
return 0;
}
-extern const char tor_svn_revision[]; /* from tor_main.c */
+extern const char tor_git_revision[]; /* from tor_main.c */
/** The version of this Tor process, as parsed. */
static char *_version = NULL;
@@ -827,10 +827,10 @@ const char *
get_version(void)
{
if (_version == NULL) {
- if (strlen(tor_svn_revision)) {
- size_t len = strlen(VERSION)+strlen(tor_svn_revision)+8;
+ if (strlen(tor_git_revision)) {
+ size_t len = strlen(VERSION)+strlen(tor_git_revision)+16;
_version = tor_malloc(len);
- tor_snprintf(_version, len, "%s (r%s)", VERSION, tor_svn_revision);
+ tor_snprintf(_version, len, "%s (git-%s)", VERSION, tor_git_revision);
} else {
_version = tor_strdup(VERSION);
}