MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / cliVersion

Function cliVersion

src/redis-cli.c:315–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313static int helpEntriesLen;
314
315static sds cliVersion(void) {
316 sds version;
317 version = sdscatprintf(sdsempty(), "%s", KEYDB_REAL_VERSION);
318
319 /* Add git commit and working tree status when available */
320 if (strtoll(redisGitSHA1(),NULL,16)) {
321 version = sdscatprintf(version, " (git:%s", redisGitSHA1());
322 if (strtoll(redisGitDirty(),NULL,10))
323 version = sdscatprintf(version, "-dirty");
324 version = sdscat(version, ")");
325 }
326 return version;
327}
328
329static void cliInitHelp(void) {
330 int commandslen = sizeof(commandHelp)/sizeof(struct commandHelp);

Callers 3

cliOutputGenericHelpFunction · 0.85
parseOptionsFunction · 0.85
usageFunction · 0.85

Calls 5

sdscatprintfFunction · 0.85
sdsemptyFunction · 0.85
redisGitSHA1Function · 0.85
redisGitDirtyFunction · 0.85
sdscatFunction · 0.85

Tested by

no test coverage detected