MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cliVersion

Function cliVersion

app/redis-6.2.6/src/redis-cli.c:508–520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506static int helpEntriesLen;
507
508static sds cliVersion(void) {
509 sds version;
510 version = sdscatprintf(sdsempty(), "%s", REDIS_VERSION);
511
512 /* Add git commit and working tree status when available */
513 if (strtoll(redisGitSHA1(),NULL,16)) {
514 version = sdscatprintf(version, " (git:%s", redisGitSHA1());
515 if (strtoll(redisGitDirty(),NULL,10))
516 version = sdscatprintf(version, "-dirty");
517 version = sdscat(version, ")");
518 }
519 return version;
520}
521
522static void cliInitHelp(void) {
523 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