Fix error message for the DEBUG ZIPLIST command (#7745)

DEBUG ZIPLIST <key> currently returns the following error string if the
key is not a ziplist: "ERR Not an sds encoded string.". This looks like
an accidental copy/paste error from the error returned in the else if
branch above where this string is returned if the key is not an sds
string. The command was added in
f898429fe149f476d61270ed4299dd1f8f75ae50 and looking at the commit,
nothing indicates that it is not an accidental typo.

The error string now returns a correct error: "Not a ziplist encoded
object", which accurately describes the error.
This commit is contained in:
Pierre Jambet 2020-09-02 16:27:48 -04:00 committed by GitHub
parent 0db61f5649
commit 42dc0e98aa

View File

@ -588,7 +588,7 @@ NULL
== NULL) return; == NULL) return;
if (o->encoding != OBJ_ENCODING_ZIPLIST) { if (o->encoding != OBJ_ENCODING_ZIPLIST) {
addReplyError(c,"Not an sds encoded string."); addReplyError(c,"Not a ziplist encoded object.");
} else { } else {
ziplistRepr(o->ptr); ziplistRepr(o->ptr);
addReplyStatus(c,"Ziplist structure printed on stdout"); addReplyStatus(c,"Ziplist structure printed on stdout");