antirez/redis — pull request #1416 by Dieken (2013-11-30 16:07:59+00:00)
Title: don't throw some options on config rewrite

Those options will be thrown without this patch:
include, rename-command, min-slaves-to-write, min-slaves-max-lag,
appendfilename.

I found Redis throws "appendfilename" on config rewrite during playing Redis sentinel,
then I write a script to figure out other thrown options:

$ cat ~/check-redis-config.c.sh
perl -ne 'print if /void loadServerConfigFromString/ .. /^}/' config.c | perl -lne 'print $1 if /^ {8}\S.*strcasecmp.*,\s*"([^"]+)/' | sort > loadServerConfigFromString.txt

perl -ne 'print if /void configSetCommand/ .. /^}/' config.c | perl -lne 'print $1 if /^ {4}\S.*strcasecmp.*,\s*"([^"]+)/' | sort > configSetCommand.txt

perl -ne 'print if /void configGetCommand/ .. /^}/' config.c | perl -lne 'print $1 if /^ {4}(?:\S*config_get_\w+\(|\S.*stringmatch[^"]+)\s*"([^"]+)/' | sort > configGetCommand.txt

{
perl -ne 'print if /int rewriteConfig\(/ .. /^}/' config.c | perl -lne 'print $1 if /^ {4}\S*rewriteConfig[^"]+"([^"]+)/'
perl -ne 'print if /int rewriteConfig\(/ .. /^}/' config.c | perl -lne 'print lc($1) if !/"/ && /^ {4}(?:\S.* )?rewriteConfig(\S+)Option/'
} | sort > rewriteConfig.txt