]> git.saurik.com Git - redis.git/commitdiff
Added Git sha1 and dirty status in redis-server -v output
authorantirez <antirez@gmail.com>
Thu, 27 May 2010 22:23:27 +0000 (00:23 +0200)
committerantirez <antirez@gmail.com>
Thu, 27 May 2010 22:23:27 +0000 (00:23 +0200)
redis.c

diff --git a/redis.c b/redis.c
index 33db9a1ac756cb66a9ac08305380fa96e7cc4431..639b71df1c7dfcbb55a3174ed5498401f9c7fa74 100644 (file)
--- a/redis.c
+++ b/redis.c
@@ -10906,7 +10906,8 @@ static void daemonize(void) {
 }
 
 static void version() {
 }
 
 static void version() {
-    printf("Redis server version %s\n", REDIS_VERSION);
+    printf("Redis server version %s (%s:%d)\n", REDIS_VERSION,
+        REDIS_GIT_SHA1, atoi(REDIS_GIT_DIRTY) > 0);
     exit(0);
 }
 
     exit(0);
 }