daemon: be strict at parsing parameters --[no-]informative-errors
Use strcmp() instead of starts_with()/!prefixcmp() to stop accepting --informative-errors-just-a-little Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
2f93541d88
commit
82246b765b
4
daemon.c
4
daemon.c
@ -1278,11 +1278,11 @@ int main(int argc, char **argv)
|
||||
make_service_overridable(arg + 18, 0);
|
||||
continue;
|
||||
}
|
||||
if (!prefixcmp(arg, "--informative-errors")) {
|
||||
if (!strcmp(arg, "--informative-errors")) {
|
||||
informative_errors = 1;
|
||||
continue;
|
||||
}
|
||||
if (!prefixcmp(arg, "--no-informative-errors")) {
|
||||
if (!strcmp(arg, "--no-informative-errors")) {
|
||||
informative_errors = 0;
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user