* [PATCH] daemon: be strict at parsing parameters --[no-]informative-errors
@ 2013-12-20 10:53 Nguyễn Thái Ngọc Duy
2013-12-20 18:46 ` Jonathan Nieder
0 siblings, 1 reply; 2+ messages in thread
From: Nguyễn Thái Ngọc Duy @ 2013-12-20 10:53 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Nguyễn Thái Ngọc Duy
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] daemon: be strict at parsing parameters --[no-]informative-errors
2013-12-20 10:53 [PATCH] daemon: be strict at parsing parameters --[no-]informative-errors Nguyễn Thái Ngọc Duy
@ 2013-12-20 18:46 ` Jonathan Nieder
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Nieder @ 2013-12-20 18:46 UTC (permalink / raw)
To: Nguyễn Thái Ngọc Duy; +Cc: git, Junio C Hamano
Hi,
Nguyễn Thái Ngọc Duy wrote:
> 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>
Good catch. When this use of prefixcmp was introduced in
v1.7.8-rc0~28^2 (daemon: give friendlier error messages to clients,
2011-10-14) I think it was just a typo.
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-20 18:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-20 10:53 [PATCH] daemon: be strict at parsing parameters --[no-]informative-errors Nguyễn Thái Ngọc Duy
2013-12-20 18:46 ` Jonathan Nieder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).