Skip to content

Commit

Permalink
daemon: be strict at parsing parameters --[no-]informative-errors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nguyễn Thái Ngọc Duy authored and Junio C Hamano committed Dec 20, 2013
1 parent 2f93541 commit 82246b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 82246b7

Please sign in to comment.