]> git.saurik.com Git - redis.git/blobdiff - src/redis-cli.c
now redis-cli is able to show the Git SHA1 in the version output
[redis.git] / src / redis-cli.c
index 450c6d58794fe26a38e36b02a1834d474b18d106..eef5ad1e07f7776618842d98af0a6a96944cb819 100644 (file)
@@ -67,6 +67,7 @@ static struct config {
 } config;
 
 static void usage();
+char *redisGitSHA1(void);
 
 /*------------------------------------------------------------------------------
  * Utility functions
@@ -351,7 +352,7 @@ static int parseOptions(int argc, char **argv) {
 "automatically used as last argument.\n"
             );
         } else if (!strcmp(argv[i],"-v")) {
-            printf("redis-cli shipped with Redis version %s\n", REDIS_VERSION);
+            printf("redis-cli shipped with Redis version %s (%s)\n", REDIS_VERSION, redisGitSHA1());
             exit(0);
         } else {
             break;