Re: git diagnose with invalid CLI argument does not report error
- From
Emily Shaffer <nasamuffin@google.com>
- Date
- Oct 26, 2023, 22:41 UTC
- Message-ID
- <CAJoAoZ=a30QsMXHz+47haZ=QGkY8-QYccSuY_94mi9h9RMiBFA@mail.gmail.com>
- In-Reply-To
- <CAPig+cSsB-2xxF7uQRU2h219+0-9++M_woLX3vNwiq1Uj1SiQQ@mail.gmail.com>
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:
Show 30 quoted lines
> > 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/ >