{"thread":{"id":"56575","subject":"[PATCH] bundle: remove ignored & undocumented \"--verbose\" flag","startedAt":"2021-09-23T16:48:29Z","lastAt":"2021-09-23T17:38:43Z","messageCount":2,"participants":["Ævar Arnfjörð Bjarmason","Taylor Blau"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"436868","messageId":"patch-1.1-d61f4b28dfd-20210923T164636Z-avarab@gmail.com","threadId":"56575","inReplyTo":null,"subject":"[PATCH] bundle: remove ignored & undocumented \"--verbose\" flag","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-09-23T16:48:22Z","receivedAt":"2021-09-23T16:48:29Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"In 73c3253d75e (bundle: framework for options before bundle file,\n2019-11-10) the \"git bundle\" command was refactored to use\nparse_options(). In that refactoring it started understanding the\n\"--verbose\" flag before the subcommand, e.g.:\n\n    git bundle --verbose verify --quiet\n\nHowever, nothing ever did anything with this \"verbose\" variable, and\nthe change wasn't documented. It appears to have been something that\nescaped the lab, and wasn't flagged by reviewers at the time. Let's\njust remove it.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n\nAs a follow-up to the discussion at\nhttps://lore.kernel.org/git/87zgs593ja.fsf@evledraar.gmail.com/ I\nlooked at whether any other subcommands accepted \"git cmd [opts]\nsubcommand\", here's another special-case we can safely remove.\n\nPerhaps this was from an earlier version of\nhttps://lore.kernel.org/git/20191110204126.30553-1-robbat2@gentoo.org/,\nbut I could not find v1 and v2.\n\n builtin/bundle.c | 3 ---\n 1 file changed, 3 deletions(-)\n\ndiff --git a/builtin/bundle.c b/builtin/bundle.c\nindex 91975def2da..5a85d7cd0fe 100644\n--- a/builtin/bundle.c\n+++ b/builtin/bundle.c\n@@ -39,8 +39,6 @@ static const char * const builtin_bundle_unbundle_usage[] = {\n   NULL\n };\n \n-static int verbose;\n-\n static int parse_options_cmd_bundle(int argc,\n \t\tconst char **argv,\n \t\tconst char* prefix,\n@@ -197,7 +195,6 @@ static int cmd_bundle_unbundle(int argc, const char **argv, const char *prefix)\n int cmd_bundle(int argc, const char **argv, const char *prefix)\n {\n \tstruct option options[] = {\n-\t\tOPT__VERBOSE(&verbose, N_(\"be verbose; must be placed before a subcommand\")),\n \t\tOPT_END()\n \t};\n \tint result;\n-- \n2.33.0.1229.g7e7cef8c419\n\n"},{"id":"436876","messageId":"YUy7mkaRCLKrMJBw@nand.local","threadId":"56575","inReplyTo":"patch-1.1-d61f4b28dfd-20210923T164636Z-avarab@gmail.com","subject":"Re: [PATCH] bundle: remove ignored & undocumented \"--verbose\" flag","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2021-09-23T17:38:34Z","receivedAt":"2021-09-23T17:38:43Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Thu, Sep 23, 2021 at 06:48:22PM +0200, Ævar Arnfjörð Bjarmason wrote:\n> In 73c3253d75e (bundle: framework for options before bundle file,\n> 2019-11-10) the \"git bundle\" command was refactored to use\n> parse_options(). In that refactoring it started understanding the\n> \"--verbose\" flag before the subcommand, e.g.:\n>\n>     git bundle --verbose verify --quiet\n>\n> However, nothing ever did anything with this \"verbose\" variable, and\n> the change wasn't documented. It appears to have been something that\n> escaped the lab, and wasn't flagged by reviewers at the time. Let's\n> just remove it.\n\nThanks; this looks good to me. We never use the `verbose` variable for\nanything, and it isn't documented. So I agree that it can be removed.\n\nThanks for cleaning this up:\n\n    Reviewed-by: Taylor Blau <me@ttaylorr.com>\n\nThanks,\nTaylor\n"}]}