git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: BUG: config.c:129: kvi should not be set while parsing a config source

From
Derrick Stolee <derrickstolee@github.com>
Date
Jun 23, 2023, 13:36 UTC
Message-ID
<6961779f-9fd8-28cb-6046-cc24b6869cbc@github.com>
In-Reply-To
<CAJSLrw6qhHj8Kxrqhp7xN=imTHgg79QB9Fxa9XpdZYFnBKhkvA@mail.gmail.com>
On 6/21/2023 7:45 PM, Jesse Kasky wrote:
Show 6 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 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

Previous: Jesse KaskyNext: Glen Choo
Message 2 of 3 in “BUG: config.c:129: kvi should not be set while parsing a config source”
  1. Jesse KaskyJun 21, 2023
  2. Derrick StoleeJun 23, 2023
  3. Glen ChooJun 23, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.