Thread (36 messages) flat view 36 messages, 2 authors, 2016-06-15

Re: [PATCH 2/2] bundle: rewrite builtin to use parse-options

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:52:35

Ramkumar Ramachandra wrote:
-	if (argc < 3)
-		usage(builtin_bundle_usage);
-
-	cmd = argv[1];
-	bundle_file = argv[2];
-	argc -= 2;
-	argv += 2;
+	argc = parse_options(argc, argv, NULL,
+			options, builtin_bundle_usage,
+			PARSE_OPT_KEEP_ARGV0 | PARSE_OPT_KEEP_UNKNOWN);
Doesn't this make the usage completely confusing?  Before, if I wanted
to create bundle named "verify", I could write

	git bundle create verify

Afterwards, not only does that not work, but if I make a typo and
write

	git bundle ceate verify

then it will act like "git bundle verify ceate".

I am starting to suspect the first half of patch 1/2 was not such a
great idea, either. :)  Do you have other examples of how it would be
used?

Thanks for thining about these things, and hope that helps.
Jonathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help