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

[PATCH] prune-packed: check for too many arguments

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Feb 11, 2019, 17:23 UTC
Message-ID
<feaa30fe-acc7-9748-eaa9-1afbcf7fa5b2@ramsayjones.plus.com>
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
Hi Junio,

Another 'old find' (from feb 2017), but this time I don't seem to have sent this one to the list before. It is possible that I didn't think it was up to scratch ... dunno. ;-)

ATB, Ramsay Jones

 builtin/prune-packed.c | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/builtin/prune-packed.c b/builtin/prune-packed.c
index a9e7b552b9..48c5e78e33 100644
--- a/builtin/prune-packed.c
+++ b/builtin/prune-packed.c
@@ -63,6 +63,11 @@ int cmd_prune_packed(int argc, const char **argv, const char *prefix)
 	argc = parse_options(argc, argv, prefix, prune_packed_options,
 			     prune_packed_usage, 0);
 
+	if (argc > 0)
+		usage_msg_opt(_("too many arguments"),
+			      prune_packed_usage,
+			      prune_packed_options);
+
 	prune_packed_objects(opts);
 	return 0;
 }
-- 
2.20.0
Message 1 of 1 in “prune-packed: check for too many arguments”
  1. prune-packed: check for too many argumentsRamsay Jones, Feb 11, 2019

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.