* [PATCH] bugreport: clarify that -o expects a directory and not a file
@ 2022-09-28 5:04 Alex Henrie
2022-09-28 15:09 ` Ævar Arnfjörð Bjarmason
0 siblings, 1 reply; 3+ messages in thread
From: Alex Henrie @ 2022-09-28 5:04 UTC (permalink / raw)
To: git, emilyshaffer, gitster; +Cc: Alex Henrie
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
---
Documentation/git-bugreport.txt | 2 +-
builtin/bugreport.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-bugreport.txt b/Documentation/git-bugreport.txt
index eca726e579..784d9b6304 100644
--- a/Documentation/git-bugreport.txt
+++ b/Documentation/git-bugreport.txt
@@ -8,7 +8,7 @@ git-bugreport - Collect information for user to file a bug report
SYNOPSIS
--------
[verse]
-'git bugreport' [(-o | --output-directory) <path>] [(-s | --suffix) <format>]
+'git bugreport' [(-o | --output-directory) <dir>] [(-s | --suffix) <format>]
[--diagnose[=<mode>]]
DESCRIPTION
diff --git a/builtin/bugreport.c b/builtin/bugreport.c
index 530895be55..827688183e 100644
--- a/builtin/bugreport.c
+++ b/builtin/bugreport.c
@@ -60,7 +60,7 @@ static void get_populated_hooks(struct strbuf *hook_info, int nongit)
}
static const char * const bugreport_usage[] = {
- N_("git bugreport [-o|--output-directory <file>] [-s|--suffix <format>] [--diagnose[=<mode>]"),
+ N_("git bugreport [-o|--output-directory <dir>] [-s|--suffix <format>] [--diagnose[=<mode>]"),
NULL
};
@@ -110,7 +110,7 @@ int cmd_bugreport(int argc, const char **argv, const char *prefix)
OPT_CALLBACK_F(0, "diagnose", &diagnose, N_("mode"),
N_("create an additional zip archive of detailed diagnostics (default 'stats')"),
PARSE_OPT_OPTARG, option_parse_diagnose),
- OPT_STRING('o', "output-directory", &option_output, N_("path"),
+ OPT_STRING('o', "output-directory", &option_output, N_("dir"),
N_("specify a destination for the bugreport file(s)")),
OPT_STRING('s', "suffix", &option_suffix, N_("format"),
N_("specify a strftime format suffix for the filename(s)")),
--
2.37.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] bugreport: clarify that -o expects a directory and not a file
2022-09-28 5:04 [PATCH] bugreport: clarify that -o expects a directory and not a file Alex Henrie
@ 2022-09-28 15:09 ` Ævar Arnfjörð Bjarmason
2022-09-28 16:27 ` Alex Henrie
0 siblings, 1 reply; 3+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2022-09-28 15:09 UTC (permalink / raw)
To: Alex Henrie; +Cc: git, emilyshaffer, gitster
On Tue, Sep 27 2022, Alex Henrie wrote:
> Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
> ---
> Documentation/git-bugreport.txt | 2 +-
> builtin/bugreport.c | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/git-bugreport.txt b/Documentation/git-bugreport.txt
> index eca726e579..784d9b6304 100644
> --- a/Documentation/git-bugreport.txt
> +++ b/Documentation/git-bugreport.txt
> @@ -8,7 +8,7 @@ git-bugreport - Collect information for user to file a bug report
> SYNOPSIS
> --------
> [verse]
> -'git bugreport' [(-o | --output-directory) <path>] [(-s | --suffix) <format>]
> +'git bugreport' [(-o | --output-directory) <dir>] [(-s | --suffix) <format>]
> [--diagnose[=<mode>]]
>
> DESCRIPTION
> diff --git a/builtin/bugreport.c b/builtin/bugreport.c
> index 530895be55..827688183e 100644
> --- a/builtin/bugreport.c
> +++ b/builtin/bugreport.c
> @@ -60,7 +60,7 @@ static void get_populated_hooks(struct strbuf *hook_info, int nongit)
> }
>
> static const char * const bugreport_usage[] = {
> - N_("git bugreport [-o|--output-directory <file>] [-s|--suffix <format>] [--diagnose[=<mode>]"),
> + N_("git bugreport [-o|--output-directory <dir>] [-s|--suffix <format>] [--diagnose[=<mode>]"),
> NULL
> };
>
> @@ -110,7 +110,7 @@ int cmd_bugreport(int argc, const char **argv, const char *prefix)
> OPT_CALLBACK_F(0, "diagnose", &diagnose, N_("mode"),
> N_("create an additional zip archive of detailed diagnostics (default 'stats')"),
> PARSE_OPT_OPTARG, option_parse_diagnose),
> - OPT_STRING('o', "output-directory", &option_output, N_("path"),
> + OPT_STRING('o', "output-directory", &option_output, N_("dir"),
> N_("specify a destination for the bugreport file(s)")),
> OPT_STRING('s', "suffix", &option_suffix, N_("format"),
> N_("specify a strftime format suffix for the filename(s)")),
Hi, there's an outstanding patch of mine queued in "seen" that fixes the
same issue. I sent a re-roll of it after you submitted this (but the v1
had been in "seen". See:
https://lore.kernel.org/git/patch-v2-17.35-97873747a1e-20220928T082458Z-avarab@gmail.com/
Per that change I think the right thing here is to convert both to use
"<path>".
I don't really have a strong opinion per-se on if we use "<dir>" or
"<path>", but from grepping around the latter seems more common, even in
cases where we mean "a path that's only a dir".
In any case, if you did want to advocate that we should really use
"<dir>" you missed also updating these:
Documentation/git-bugreport.txt:-o <path>::
Documentation/git-bugreport.txt:--output-directory <path>::
Documentation/git-bugreport.txt: Place the resulting bug report file in `<path>` instead of the current
The recent "diagnose" built-in is also largely copy/pasted from
"bugreport", and uses the same interface, so in that case it would make
sense to update it too...
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] bugreport: clarify that -o expects a directory and not a file
2022-09-28 15:09 ` Ævar Arnfjörð Bjarmason
@ 2022-09-28 16:27 ` Alex Henrie
0 siblings, 0 replies; 3+ messages in thread
From: Alex Henrie @ 2022-09-28 16:27 UTC (permalink / raw)
To: Ævar Arnfjörð Bjarmason; +Cc: git, emilyshaffer, gitster
On Wed, Sep 28, 2022 at 9:13 AM Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
>
> Hi, there's an outstanding patch of mine queued in "seen" that fixes the
> same issue. I sent a re-roll of it after you submitted this (but the v1
> had been in "seen". See:
> https://lore.kernel.org/git/patch-v2-17.35-97873747a1e-20220928T082458Z-avarab@gmail.com/
Thanks! It looks like you caught a lot more inconsistencies than I
did. Let's forget about my patch and just wait for yours to be merged.
> Per that change I think the right thing here is to convert both to use
> "<path>".
>
> I don't really have a strong opinion per-se on if we use "<dir>" or
> "<path>", but from grepping around the latter seems more common, even in
> cases where we mean "a path that's only a dir".
My main concern is that the usage string says that `git bugreport -o`
expects a file when in fact it expects a directory. I don't have a
strong opinion on whether the usage string should say <dir> or <path>;
either is more correct than <file>.
-Alex
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-28 16:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-28 5:04 [PATCH] bugreport: clarify that -o expects a directory and not a file Alex Henrie
2022-09-28 15:09 ` Ævar Arnfjörð Bjarmason
2022-09-28 16:27 ` Alex Henrie
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).