{"thread":{"id":"58525","subject":"[PATCH] bugreport: clarify that -o expects a directory and not a file","startedAt":"2022-09-28T05:05:03Z","lastAt":"2022-09-28T16:27:38Z","messageCount":3,"participants":["Alex Henrie","Ævar Arnfjörð Bjarmason"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"463787","messageId":"20220928050432.701512-1-alexhenrie24@gmail.com","threadId":"58525","inReplyTo":null,"subject":"[PATCH] bugreport: clarify that -o expects a directory and not a file","fromName":"Alex Henrie","fromEmail":"alexhenrie24@gmail.com","sentAt":"2022-09-28T05:04:32Z","receivedAt":"2022-09-28T05:05:03Z","isPatch":true,"sender":{"key":"alexhenrie24@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5951993?v=4"},"body":"Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>\n---\n Documentation/git-bugreport.txt | 2 +-\n builtin/bugreport.c             | 4 ++--\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-bugreport.txt b/Documentation/git-bugreport.txt\nindex eca726e579..784d9b6304 100644\n--- a/Documentation/git-bugreport.txt\n+++ b/Documentation/git-bugreport.txt\n@@ -8,7 +8,7 @@ git-bugreport - Collect information for user to file a bug report\n SYNOPSIS\n --------\n [verse]\n-'git bugreport' [(-o | --output-directory) <path>] [(-s | --suffix) <format>]\n+'git bugreport' [(-o | --output-directory) <dir>] [(-s | --suffix) <format>]\n \t\t[--diagnose[=<mode>]]\n \n DESCRIPTION\ndiff --git a/builtin/bugreport.c b/builtin/bugreport.c\nindex 530895be55..827688183e 100644\n--- a/builtin/bugreport.c\n+++ b/builtin/bugreport.c\n@@ -60,7 +60,7 @@ static void get_populated_hooks(struct strbuf *hook_info, int nongit)\n }\n \n static const char * const bugreport_usage[] = {\n-\tN_(\"git bugreport [-o|--output-directory <file>] [-s|--suffix <format>] [--diagnose[=<mode>]\"),\n+\tN_(\"git bugreport [-o|--output-directory <dir>] [-s|--suffix <format>] [--diagnose[=<mode>]\"),\n \tNULL\n };\n \n@@ -110,7 +110,7 @@ int cmd_bugreport(int argc, const char **argv, const char *prefix)\n \t\tOPT_CALLBACK_F(0, \"diagnose\", &diagnose, N_(\"mode\"),\n \t\t\t       N_(\"create an additional zip archive of detailed diagnostics (default 'stats')\"),\n \t\t\t       PARSE_OPT_OPTARG, option_parse_diagnose),\n-\t\tOPT_STRING('o', \"output-directory\", &option_output, N_(\"path\"),\n+\t\tOPT_STRING('o', \"output-directory\", &option_output, N_(\"dir\"),\n \t\t\t   N_(\"specify a destination for the bugreport file(s)\")),\n \t\tOPT_STRING('s', \"suffix\", &option_suffix, N_(\"format\"),\n \t\t\t   N_(\"specify a strftime format suffix for the filename(s)\")),\n-- \n2.37.3\n\n"},{"id":"463847","messageId":"220928.86tu4rwmzk.gmgdl@evledraar.gmail.com","threadId":"58525","inReplyTo":"20220928050432.701512-1-alexhenrie24@gmail.com","subject":"Re: [PATCH] bugreport: clarify that -o expects a directory and not a file","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-09-28T15:09:16Z","receivedAt":"2022-09-28T15:13:45Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Tue, Sep 27 2022, Alex Henrie wrote:\n\n> Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>\n> ---\n>  Documentation/git-bugreport.txt | 2 +-\n>  builtin/bugreport.c             | 4 ++--\n>  2 files changed, 3 insertions(+), 3 deletions(-)\n>\n> diff --git a/Documentation/git-bugreport.txt b/Documentation/git-bugreport.txt\n> index eca726e579..784d9b6304 100644\n> --- a/Documentation/git-bugreport.txt\n> +++ b/Documentation/git-bugreport.txt\n> @@ -8,7 +8,7 @@ git-bugreport - Collect information for user to file a bug report\n>  SYNOPSIS\n>  --------\n>  [verse]\n> -'git bugreport' [(-o | --output-directory) <path>] [(-s | --suffix) <format>]\n> +'git bugreport' [(-o | --output-directory) <dir>] [(-s | --suffix) <format>]\n>  \t\t[--diagnose[=<mode>]]\n>  \n>  DESCRIPTION\n> diff --git a/builtin/bugreport.c b/builtin/bugreport.c\n> index 530895be55..827688183e 100644\n> --- a/builtin/bugreport.c\n> +++ b/builtin/bugreport.c\n> @@ -60,7 +60,7 @@ static void get_populated_hooks(struct strbuf *hook_info, int nongit)\n>  }\n>  \n>  static const char * const bugreport_usage[] = {\n> -\tN_(\"git bugreport [-o|--output-directory <file>] [-s|--suffix <format>] [--diagnose[=<mode>]\"),\n> +\tN_(\"git bugreport [-o|--output-directory <dir>] [-s|--suffix <format>] [--diagnose[=<mode>]\"),\n>  \tNULL\n>  };\n>  \n> @@ -110,7 +110,7 @@ int cmd_bugreport(int argc, const char **argv, const char *prefix)\n>  \t\tOPT_CALLBACK_F(0, \"diagnose\", &diagnose, N_(\"mode\"),\n>  \t\t\t       N_(\"create an additional zip archive of detailed diagnostics (default 'stats')\"),\n>  \t\t\t       PARSE_OPT_OPTARG, option_parse_diagnose),\n> -\t\tOPT_STRING('o', \"output-directory\", &option_output, N_(\"path\"),\n> +\t\tOPT_STRING('o', \"output-directory\", &option_output, N_(\"dir\"),\n>  \t\t\t   N_(\"specify a destination for the bugreport file(s)\")),\n>  \t\tOPT_STRING('s', \"suffix\", &option_suffix, N_(\"format\"),\n>  \t\t\t   N_(\"specify a strftime format suffix for the filename(s)\")),\n\nHi, there's an outstanding patch of mine queued in \"seen\" that fixes the\nsame issue. I sent a re-roll of it after you submitted this (but the v1\nhad been in \"seen\". See:\nhttps://lore.kernel.org/git/patch-v2-17.35-97873747a1e-20220928T082458Z-avarab@gmail.com/\n\nPer that change I think the right thing here is to convert both to use\n\"<path>\".\n\nI don't really have a strong opinion per-se on if we use \"<dir>\" or\n\"<path>\", but from grepping around the latter seems more common, even in\ncases where we mean \"a path that's only a dir\".\n\nIn any case, if you did want to advocate that we should really use\n\"<dir>\" you missed also updating these:\n\t\n\tDocumentation/git-bugreport.txt:-o <path>::\n\tDocumentation/git-bugreport.txt:--output-directory <path>::\n\tDocumentation/git-bugreport.txt:        Place the resulting bug report file in `<path>` instead of the current\n\nThe recent \"diagnose\" built-in is also largely copy/pasted from\n\"bugreport\", and uses the same interface, so in that case it would make\nsense to update it too...\n"},{"id":"463854","messageId":"CAMMLpeTbuV4_xRbGLMBTz9U+XL1MzoL_TZO_GjE4Dar8DenhDw@mail.gmail.com","threadId":"58525","inReplyTo":"220928.86tu4rwmzk.gmgdl@evledraar.gmail.com","subject":"Re: [PATCH] bugreport: clarify that -o expects a directory and not a file","fromName":"Alex Henrie","fromEmail":"alexhenrie24@gmail.com","sentAt":"2022-09-28T16:27:21Z","receivedAt":"2022-09-28T16:27:38Z","isPatch":true,"sender":{"key":"alexhenrie24@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5951993?v=4"},"body":"On Wed, Sep 28, 2022 at 9:13 AM Ævar Arnfjörð Bjarmason\n<avarab@gmail.com> wrote:\n>\n> Hi, there's an outstanding patch of mine queued in \"seen\" that fixes the\n> same issue. I sent a re-roll of it after you submitted this (but the v1\n> had been in \"seen\". See:\n> https://lore.kernel.org/git/patch-v2-17.35-97873747a1e-20220928T082458Z-avarab@gmail.com/\n\nThanks! It looks like you caught a lot more inconsistencies than I\ndid. Let's forget about my patch and just wait for yours to be merged.\n\n> Per that change I think the right thing here is to convert both to use\n> \"<path>\".\n>\n> I don't really have a strong opinion per-se on if we use \"<dir>\" or\n> \"<path>\", but from grepping around the latter seems more common, even in\n> cases where we mean \"a path that's only a dir\".\n\nMy main concern is that the usage string says that `git bugreport -o`\nexpects a file when in fact it expects a directory. I don't have a\nstrong opinion on whether the usage string should say <dir> or <path>;\neither is more correct than <file>.\n\n-Alex\n"}]}