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

Bug using `fetch` with blank `-c` arguments to git

From
Adam Dinwoodie <adam@dinwoodie.org>
Date
Jan 4, 2022, 12:36 UTC
Message-ID
<CA+kUOak9_RLpdr9d4pQiwU=K42taCwhMdg5WkLP4GreQd4yWig@mail.gmail.com>

While investigating some issues with a different project, I discovered the command `git -c config.helper= fetch` was working with the Debian stable version of Git (v2.30.2) but not with my local build (v2.34.1.428.gdcc0cd074f).

Specifically, I see the following output:

$ ./git -c credential.helper= fetch error: bogus format in GIT_CONFIG_PARAMETERS fatal: unable to parse command-line config

Investigating with `git bisect`, the change in behaviour seems to have been introduced in 1ff21c05ba ("config: store "git -c" variables using more robust format", 2021-01-12).

I see the same behaviour with `-c config.helper=`, `-c core.autocrlf=`, `-c core.autocrlf` and `-c core.autocrlf=true`.. Notably the behaviour does not affect all other git commands; `git -c core.autocrlf= log -1` works as expected.

I think this is a regression; I can't see any reason why these commands shouldn't work.

Curiously, I'm seeing this behaviour on both my Raspberry Pi OS and Debian Bullseye systems, but not my Cygwin systems. I've not yet tried to work out what the difference is there. In all cases, I was testing with my own build, built with `make -j<num> configure && ./configure --prefix=$HOME/.local && make -j<num>`.

Next: Erik Cervin Edin
Message 1 of 9 in “Bug using `fetch` with blank `-c` arguments to git”
  1. Adam DinwoodieJan 4, 2022
  2. Erik Cervin EdinJan 4, 2022
  3. Adam DinwoodieJan 4, 2022
  4. Erik Cervin EdinJan 4, 2022
  5. Bryan TurnerJan 4, 2022
  6. Adam DinwoodieJan 4, 2022
  7. Adam DinwoodieJan 6, 2022
  8. Patrick SteinhardtJan 7, 2022
  9. Adam DinwoodieJan 7, 2022

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.