* [PATCH] git-config: don't silently ignore options after --list
@ 2007-10-05 20:16 Frank Lichtenheld
0 siblings, 0 replies; only message in thread
From: Frank Lichtenheld @ 2007-10-05 20:16 UTC (permalink / raw)
To: Git Mailing List; +Cc: Junio C Hamano, Frank Lichtenheld
Error out if someone gives options after --list since that is
not a valid syntax.
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
---
builtin-config.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
Two minutes of my life I don't get back ;)
diff --git a/builtin-config.c b/builtin-config.c
index 0a605e0..cb7e9e9 100644
--- a/builtin-config.c
+++ b/builtin-config.c
@@ -172,8 +172,11 @@ int cmd_config(int argc, const char **argv, const char *prefix)
type = T_INT;
else if (!strcmp(argv[1], "--bool"))
type = T_BOOL;
- else if (!strcmp(argv[1], "--list") || !strcmp(argv[1], "-l"))
+ else if (!strcmp(argv[1], "--list") || !strcmp(argv[1], "-l")) {
+ if (argc != 2)
+ usage(git_config_set_usage);
return git_config(show_all_config);
+ }
else if (!strcmp(argv[1], "--global")) {
char *home = getenv("HOME");
if (home) {
--
1.5.3.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-10-05 20:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-05 20:16 [PATCH] git-config: don't silently ignore options after --list Frank Lichtenheld
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).