git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heghedus Razvan <heghedus.razvan@protonmail.com>
To: git@vger.kernel.org
Cc: ps@pks.im
Subject: git init BUG when gitconfig has includeIf
Date: Tue, 21 May 2024 07:54:11 +0000	[thread overview]
Message-ID: <D1F5SJ52H4Z0.1NR7M8APRFTOB@protonmail.com> (raw)

Hello everybody

Yesterday I stumble upon a bug when doing git init. I didn't
find any references to it, so I don't know if is a known problem
or not.

Steps to reproduce:
# git init .
BUG: refs.c:2123: reference backend is unknown

I'm able to reproduce this on multiple systems where the git
version is newer than v2.44.0. This happens only when I have
an "includeIf" in the ~/.gitconfig . Bellow [1] I have a
minimal configuration for reproducing the bug. With same
gitconfig but versions lower than v2.43.4 the error is
no longer happening.

So I went and did a git bisection and the error appeared with
173761e21b setup: start tracking ref storage format
Previous commit ("0fcc285c5e") is working fine.

I cc'ed Patrick Steinhardt since the error appeared from his
commit.

Best regards,
Razvan

--

1:
content of ~/.gitconfig
```
[user]
        email = some_email@test.net
        name = test
[includeIf "onbranch:upstream*"]
        path=~/.gitconfig_upstream
```

content of ~/.gitconfig_upstream
```
[user]
        name = test test
```


             reply	other threads:[~2024-05-21  7:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-21  7:54 Heghedus Razvan [this message]
2024-05-21 16:36 ` git init BUG when gitconfig has includeIf Junio C Hamano
2024-05-21 16:46   ` Heghedus Razvan
2024-05-22  8:06     ` Patrick Steinhardt
2024-05-22  8:21       ` Heghedus Razvan
2024-05-22  8:27         ` Patrick Steinhardt
2024-05-22 10:38 ` [PATCH] setup: fix bug with "includeIf.onbranch" when initializing dir Patrick Steinhardt
2024-05-22 10:58   ` Heghedus Razvan
2024-05-22 19:06     ` Junio C Hamano
2024-05-23  0:41   ` Junio C Hamano
2024-05-23  5:26     ` Patrick Steinhardt
2024-05-23  0:43   ` [PATCH v2] " Junio C Hamano
2024-05-23  0:56     ` [rPATCH " Junio C Hamano
2024-05-23  5:26     ` [PATCH " Patrick Steinhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D1F5SJ52H4Z0.1NR7M8APRFTOB@protonmail.com \
    --to=heghedus.razvan@protonmail.com \
    --cc=git@vger.kernel.org \
    --cc=ps@pks.im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).