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

[PATCH B v4 4/5] git config: don't allow extra arguments for -e or -l.

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Feb 21, 2009, 00:49 UTC
Message-ID
<1235177369-2727-5-git-send-email-felipe.contreras@gmail.com>
In-Reply-To
<1235177369-2727-4-git-send-email-felipe.contreras@gmail.com>
As suggested by Johannes Schindelin.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 builtin-config.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/builtin-config.c b/builtin-config.c
index c2a30f2..8045926 100644
--- a/builtin-config.c
+++ b/builtin-config.c
@@ -373,6 +373,7 @@ int cmd_config(int argc, const char **argv, const char *unused_prefix)
 		}
 
 	if (actions == ACTION_LIST) {
+		check_argc(argc, 0, 0);
 		if (git_config(show_all_config, NULL) < 0) {
 			if (config_exclusive_filename)
 				die("unable to read config file %s: %s",
@@ -382,6 +383,7 @@ int cmd_config(int argc, const char **argv, const char *unused_prefix)
 		}
 	}
 	else if (actions == ACTION_EDIT) {
+		check_argc(argc, 0, 0);
 		git_config(git_default_config, NULL);
 		launch_editor(config_exclusive_filename ?
 			      config_exclusive_filename : git_path("config"),
-- 
1.6.1.3
Previous: Felipe ContrerasNext: Felipe Contreras
Message 5 of 13 in “git config: reorganization”
  1. 0/5 git config: reorganizationFelipe Contreras, Feb 21, 2009
  2. 1/5 git config: reorganize to use parseoptFelipe Contreras, Feb 21, 2009
  3. 2/5 git config: don't allow multiple config file locationsFelipe Contreras, Feb 21, 2009
  4. 3/5 git config: don't allow multiple variable typesFelipe Contreras, Feb 21, 2009
  5. 4/5 git config: don't allow extra arguments for -e or -l.Felipe Contreras, Feb 21, 2009
  6. 5/5 git config: don't allow --get-color* and variable typeFelipe Contreras, Feb 21, 2009
  7. Junio C HamanoFeb 22, 2009
  8. Felipe ContrerasFeb 22, 2009
  9. Junio C HamanoFeb 22, 2009
  10. Felipe ContrerasMar 7, 2009
  11. Junio C HamanoFeb 22, 2009
  12. Felipe ContrerasFeb 22, 2009
  13. Felipe ContrerasFeb 21, 2009

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.