* git diagnose with invalid CLI argument does not report error
@ 2023-10-25 20:49 Sheik
2023-10-26 11:10 ` Bagas Sanjaya
0 siblings, 1 reply; 5+ messages in thread
From: Sheik @ 2023-10-25 20:49 UTC (permalink / raw)
To: git
Hi Maintainers,
Running git diagnose with an invalid CLI argument in a valid Git
directory does not report error. Expected behaviour would be that it
reports an error.
#Example shell commands which should have reported an error but
continues to succeed
cd $ToAGitDirectory
git diagnose mod
git diagnose mode
git diagnose mode=all
Thanks
Sheik
[System Info]
git version:
git version 2.42.0
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 6.5.0-2-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.5.6-1
(2023-10-07) x86_64
compiler info: gnuc: 13.2
libc info: glibc: 2.37
$SHELL (typically, interactive shell): /bin/bash
[Enabled Hooks]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git diagnose with invalid CLI argument does not report error
2023-10-25 20:49 git diagnose with invalid CLI argument does not report error Sheik
@ 2023-10-26 11:10 ` Bagas Sanjaya
2023-10-26 22:11 ` Eric Sunshine
0 siblings, 1 reply; 5+ messages in thread
From: Bagas Sanjaya @ 2023-10-26 11:10 UTC (permalink / raw)
To: Sheik, Git Mailing List
Cc: Elijah Newren, Calvin Wan, Junio C Hamano,
Ævar Arnfjörð Bjarmason, Alex Henrie,
Derrick Stolee, Victoria Dye, Kristoffer Haugsbakk
[-- Attachment #1: Type: text/plain, Size: 772 bytes --]
On Thu, Oct 26, 2023 at 07:49:58AM +1100, Sheik wrote:
> Hi Maintainers,
>
>
> Running git diagnose with an invalid CLI argument in a valid Git directory
> does not report error. Expected behaviour would be that it reports an error.
>
> #Example shell commands which should have reported an error but continues to
> succeed
>
> cd $ToAGitDirectory
>
> git diagnose mod
>
> git diagnose mode
>
> git diagnose mode=all
>
I can reproduce this only when the invalid parameter is a normal word:
```
$ git diagnose huh
```
But the command errors out on invalid flag:
```
$ git diagnose -m
```
Cc:'ing people who recently worked on builtin/diagnose.c for help.
Thanks.
--
An old man doll... just what I always wanted! - Clara
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git diagnose with invalid CLI argument does not report error
2023-10-26 11:10 ` Bagas Sanjaya
@ 2023-10-26 22:11 ` Eric Sunshine
2023-10-26 22:41 ` Emily Shaffer
0 siblings, 1 reply; 5+ messages in thread
From: Eric Sunshine @ 2023-10-26 22:11 UTC (permalink / raw)
To: Bagas Sanjaya
Cc: Sheik, Git Mailing List, Elijah Newren, Calvin Wan,
Junio C Hamano, Ævar Arnfjörð Bjarmason,
Alex Henrie, Derrick Stolee, Victoria Dye, Kristoffer Haugsbakk
On Thu, Oct 26, 2023 at 7:10 AM Bagas Sanjaya <bagasdotme@gmail.com> wrote:
> On Thu, Oct 26, 2023 at 07:49:58AM +1100, Sheik wrote:
> > Hi Maintainers,
> >
> > Running git diagnose with an invalid CLI argument in a valid Git directory
> > does not report error. Expected behaviour would be that it reports an error.
> >
> > #Example shell commands which should have reported an error but continues to
> > succeed
> >
> > cd $ToAGitDirectory
> > git diagnose mod
> > git diagnose mode
> > git diagnose mode=all
>
> I can reproduce this only when the invalid parameter is a normal word:
> ```
> $ git diagnose huh
> ```
> But the command errors out on invalid flag:
> ```
> $ git diagnose -m
> ```
> Cc:'ing people who recently worked on builtin/diagnose.c for help.
A patch by Emily to fix this has been submitted[v4].
[v4]: https://lore.kernel.org/git/20231026182231.3369370-3-nasamuffin@google.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git diagnose with invalid CLI argument does not report error
2023-10-26 22:11 ` Eric Sunshine
@ 2023-10-26 22:41 ` Emily Shaffer
2023-10-26 22:43 ` Eric Sunshine
0 siblings, 1 reply; 5+ messages in thread
From: Emily Shaffer @ 2023-10-26 22:41 UTC (permalink / raw)
To: Eric Sunshine
Cc: Bagas Sanjaya, Sheik, Git Mailing List, Elijah Newren, Calvin Wan,
Junio C Hamano, Ævar Arnfjörð Bjarmason,
Alex Henrie, Derrick Stolee, Victoria Dye, Kristoffer Haugsbakk
To be clear, that patch was for git-bugreport and doesn't cover
git-diagnose. I assume the fix ends up being pretty similar though.
On Thu, Oct 26, 2023 at 3:12 PM Eric Sunshine <sunshine@sunshineco.com> wrote:
>
> On Thu, Oct 26, 2023 at 7:10 AM Bagas Sanjaya <bagasdotme@gmail.com> wrote:
> > On Thu, Oct 26, 2023 at 07:49:58AM +1100, Sheik wrote:
> > > Hi Maintainers,
> > >
> > > Running git diagnose with an invalid CLI argument in a valid Git directory
> > > does not report error. Expected behaviour would be that it reports an error.
> > >
> > > #Example shell commands which should have reported an error but continues to
> > > succeed
> > >
> > > cd $ToAGitDirectory
> > > git diagnose mod
> > > git diagnose mode
> > > git diagnose mode=all
> >
> > I can reproduce this only when the invalid parameter is a normal word:
> > ```
> > $ git diagnose huh
> > ```
> > But the command errors out on invalid flag:
> > ```
> > $ git diagnose -m
> > ```
> > Cc:'ing people who recently worked on builtin/diagnose.c for help.
>
> A patch by Emily to fix this has been submitted[v4].
>
> [v4]: https://lore.kernel.org/git/20231026182231.3369370-3-nasamuffin@google.com/
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git diagnose with invalid CLI argument does not report error
2023-10-26 22:41 ` Emily Shaffer
@ 2023-10-26 22:43 ` Eric Sunshine
0 siblings, 0 replies; 5+ messages in thread
From: Eric Sunshine @ 2023-10-26 22:43 UTC (permalink / raw)
To: Emily Shaffer
Cc: Bagas Sanjaya, Sheik, Git Mailing List, Elijah Newren, Calvin Wan,
Junio C Hamano, Ævar Arnfjörð Bjarmason,
Alex Henrie, Derrick Stolee, Victoria Dye, Kristoffer Haugsbakk
On Thu, Oct 26, 2023 at 6:41 PM Emily Shaffer <nasamuffin@google.com> wrote:
> On Thu, Oct 26, 2023 at 3:12 PM Eric Sunshine <sunshine@sunshineco.com> wrote:
> > On Thu, Oct 26, 2023 at 7:10 AM Bagas Sanjaya <bagasdotme@gmail.com> wrote:
> > > On Thu, Oct 26, 2023 at 07:49:58AM +1100, Sheik wrote:
> > > > Running git diagnose with an invalid CLI argument in a valid Git directory
> > > > does not report error. Expected behaviour would be that it reports an error.
> > >
> > > I can reproduce this only when the invalid parameter is a normal word:
> > > Cc:'ing people who recently worked on builtin/diagnose.c for help.
> >
> > A patch by Emily to fix this has been submitted[v4].
>
> To be clear, that patch was for git-bugreport and doesn't cover
> git-diagnose. I assume the fix ends up being pretty similar though.
My bad.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-10-26 22:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-25 20:49 git diagnose with invalid CLI argument does not report error Sheik
2023-10-26 11:10 ` Bagas Sanjaya
2023-10-26 22:11 ` Eric Sunshine
2023-10-26 22:41 ` Emily Shaffer
2023-10-26 22:43 ` Eric Sunshine
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 NNTP newsgroup(s).