Re: bug: git shows hints that should be suppressed
- From
Elijah Newren <newren@gmail.com>
- Date
- Mar 19, 2025, 14:45 UTC
- Message-ID
- <CABPp-BGTrEfGqX=o3W5rfqZiRdEuAzdKJuT8W0J=6kSY9ME4LQ@mail.gmail.com>
- In-Reply-To
- <7EC98E2F-144D-4974-94F6-FC24B443651D@norbauer.com>
On Wed, Mar 19, 2025 at 2:59 AM <alan@norbauer.com> wrote:
Show 18 quoted lines
> > Thank you for filling out a Git bug report! > Please answer the following questions to help us understand your issue. > > What did you do before the bug happened? (Steps to reproduce your issue) > `GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_SYSTEM=/dev/null GIT_CONFIG_NOSYSTEM=0 GIT_ADVICE=0 git clone --quiet /Volumes/sourcecode/npm-packages/packages/repository-tools/node_modules/.cache/@altano/repository-tools/2078b9db1d71a4f4a5422e25a7016c75/git.bundle .` > > What did you expect to happen? (Expected behavior) > I would expect the clone to happen without any hints because I provided both `GIT_ADVICE=0` _and_ `--quiet` to the command. Both should suppress the hint. > > What happened instead? (Actual behavior) > I received the "hint: Using 'master' as the name for the initial branch. This default branch name" on stderr, which caused my tests to fail (I am using git programmatically in a test). > > What's different between what you expected and what actually happened? > The hint on stderr was displayed. > > Anything else you want to add: > This behavior is NOT observed on git v2.44.0 and is observed on git v2.48.1. So the bug started occurring somewhere in between those versions. I can find the exact version the bug was introduced manually with some effort if that would be helpful.
Bisects to 199f44cb2ead (builtin/clone: allow remote helpers to detect repo, 2024-02-27); cc'ing its author.