]> Pileus Git - ~andy/git/commitdiff
daemon: be strict at parsing parameters --[no-]informative-errors
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Fri, 20 Dec 2013 10:53:52 +0000 (17:53 +0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Dec 2013 22:05:07 +0000 (14:05 -0800)
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>
daemon.c

index 34916c5e105812e36d659dfeeb8341e003e746bd..13608c07c674171ace754154c5d1cb7dea6c5e04 100644 (file)
--- a/daemon.c
+++ b/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;
                }