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>
Nguyễn Thái Ngọc Duy committed
Dec 20, 2013 at 17:53 UTC
82246b765bdfc191aa809cf3dd672de18ad6352a
1 file changed
+2
-2
daemon.c
+2
-2
@@ -1278,11 +1278,11 @@ int main(int argc, char **argv)
1278
make_service_overridable(arg + 18, 0);
1279
continue;
1280
}
1281
- if (!prefixcmp(arg, "--informative-errors")) {
1281
+ if (!strcmp(arg, "--informative-errors")) {
1282
informative_errors = 1;
1283
continue;
1284
}
1285
- if (!prefixcmp(arg, "--no-informative-errors")) {
1285
+ if (!strcmp(arg, "--no-informative-errors")) {
1286
informative_errors = 0;
1287
continue;
1288
}