Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
11fd0c42
Commit
11fd0c42
authored
Nov 08, 2010
by
antirez
Browse files
now redis-cli is able to show the Git SHA1 in the version output
parent
d9d8ccab
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Makefile
View file @
11fd0c42
...
...
@@ -26,7 +26,7 @@ INSTALL= cp -p
OBJ
=
adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o vm.o pubsub.o multi.o debug.o sort.o intset.o syncio.o
BENCHOBJ
=
ae.o anet.o redis-benchmark.o sds.o adlist.o zmalloc.o
CLIOBJ
=
anet.o sds.o adlist.o redis-cli.o zmalloc.o
CLIOBJ
=
anet.o sds.o adlist.o redis-cli.o zmalloc.o
release.o
CHECKDUMPOBJ
=
redis-check-dump.o lzf_c.o lzf_d.o
CHECKAOFOBJ
=
redis-check-aof.o
...
...
src/redis-cli.c
View file @
11fd0c42
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment