{"thread":{"id":"35557","subject":"[PATCH] daemon: be strict at parsing parameters --[no-]informative-errors","startedAt":"2013-12-20T10:53:52Z","lastAt":"2013-12-20T18:46:44Z","messageCount":2,"participants":["Nguyễn Thái Ngọc Duy","Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"232284","messageId":"1387536832-650-1-git-send-email-pclouds@gmail.com","threadId":"35557","inReplyTo":null,"subject":"[PATCH] daemon: be strict at parsing parameters --[no-]informative-errors","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2013-12-20T10:53:52Z","receivedAt":"2013-12-20T10:53:52Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Use strcmp() instead of starts_with() to stop accepting\n--informative-errors-just-a-little\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n daemon.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/daemon.c b/daemon.c\nindex 7bee953..503e039 100644\n--- a/daemon.c\n+++ b/daemon.c\n@@ -1278,11 +1278,11 @@ int main(int argc, char **argv)\n \t\t\tmake_service_overridable(arg + 18, 0);\n \t\t\tcontinue;\n \t\t}\n-\t\tif (starts_with(arg, \"--informative-errors\")) {\n+\t\tif (!strcmp(arg, \"--informative-errors\")) {\n \t\t\tinformative_errors = 1;\n \t\t\tcontinue;\n \t\t}\n-\t\tif (starts_with(arg, \"--no-informative-errors\")) {\n+\t\tif (!strcmp(arg, \"--no-informative-errors\")) {\n \t\t\tinformative_errors = 0;\n \t\t\tcontinue;\n \t\t}\n-- \n1.8.5.1.208.g019362e\n"},{"id":"232289","messageId":"20131220184644.GA10609@google.com","threadId":"35557","inReplyTo":"1387536832-650-1-git-send-email-pclouds@gmail.com","subject":"Re: [PATCH] daemon: be strict at parsing parameters --[no-]informative-errors","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-12-20T18:46:44Z","receivedAt":"2013-12-20T18:46:44Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nNguyễn Thái Ngọc Duy wrote:\n\n> Use strcmp() instead of starts_with() to stop accepting\n> --informative-errors-just-a-little\n>\n> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n\nGood catch.  When this use of prefixcmp was introduced in\nv1.7.8-rc0~28^2 (daemon: give friendlier error messages to clients,\n2011-10-14) I think it was just a typo.\n\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n"}]}