All of lore.kernel.org
 help / color / mirror / Atom feed
From: Derrick Stolee <derrickstolee@github.com>
To: jkasky@slack-corp.com, git@vger.kernel.org,
	Glen Choo <chooglen@google.com>
Subject: Re: BUG: config.c:129: kvi should not be set while parsing a config source
Date: Fri, 23 Jun 2023 09:36:53 -0400	[thread overview]
Message-ID: <6961779f-9fd8-28cb-6046-cc24b6869cbc@github.com> (raw)
In-Reply-To: <CAJSLrw6qhHj8Kxrqhp7xN=imTHgg79QB9Fxa9XpdZYFnBKhkvA@mail.gmail.com>

On 6/21/2023 7:45 PM, Jesse Kasky wrote:
> 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 clone --no-checkout --sparse --filter=blob:none --depth=1 <repo> <dir>

I'll note the oddity of using a blobless clone filter alongside a
shallow clone. This is something we are not super-likely to do
very often, so I could see how it is skipped by our test suite.

> cd <dir>
> git sparse-checkout add <dir1> <dir2>
> git fetch --depth=1 origin <commit>

Especially this fetch after the clone. Shallow clones are better to
only clone, then throw away. Don't fetch from them again. That said,
we shouldn't be hitting a BUG statement.

> Received the following error:
> 
> BUG: config.c:129: kvi should not be set while parsing a config source
> [1]    5842 abort      /opt/homebrew/bin/git fetch --depth=1 origin

I've come across this error while playing around with things in
the config space, and the case I figured out was due to nested
iterations over config.

In my case, I was adding dynamic config loading when certain
global variables were used, and some were used during config
parsing causing this nesting.

That's where I would start investigating, but don't have time to
dig in more than to contribute my experience with this BUG
statement.

> Two items I came across while trying to troubleshoot:
> https://github.com/git/git/commit/9828453ff00b330c57daa3a8b672cbb5f0cdce34

I have CC'd Glen, the author of that commit, and an experienced
contributor in this space.

Thanks,
-Stolee

  reply	other threads:[~2023-06-23 13:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-21 23:45 BUG: config.c:129: kvi should not be set while parsing a config source Jesse Kasky
2023-06-23 13:36 ` Derrick Stolee [this message]
2023-06-23 19:22   ` Glen Choo

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=6961779f-9fd8-28cb-6046-cc24b6869cbc@github.com \
    --to=derrickstolee@github.com \
    --cc=chooglen@google.com \
    --cc=git@vger.kernel.org \
    --cc=jkasky@slack-corp.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.