git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] daemon: be strict at parsing parameters --[no-]informative-errors

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Dec 20, 2013, 10:53 UTC
Message-ID
<1387536832-650-1-git-send-email-pclouds@gmail.com>

Use strcmp() instead of starts_with() to stop accepting --informative-errors-just-a-little

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 daemon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/daemon.c b/daemon.c
index 7bee953..503e039 100644
--- a/daemon.c
+++ b/daemon.c
@@ -1278,11 +1278,11 @@ int main(int argc, char **argv)
 			make_service_overridable(arg + 18, 0);
 			continue;
 		}
-		if (starts_with(arg, "--informative-errors")) {
+		if (!strcmp(arg, "--informative-errors")) {
 			informative_errors = 1;
 			continue;
 		}
-		if (starts_with(arg, "--no-informative-errors")) {
+		if (!strcmp(arg, "--no-informative-errors")) {
 			informative_errors = 0;
 			continue;
 		}
-- 
1.8.5.1.208.g019362e
Next: Jonathan Nieder
Message 1 of 2 in “daemon: be strict at parsing parameters --[no-]informative-errors”
  1. daemon: be strict at parsing parameters --[no-]informative-errorsNguyễn Thái Ngọc Duy, Dec 20, 2013
  2. Jonathan NiederDec 20, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.