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

[bug] generic issue with git_config handlers

From
Pierre Habouzit <madcoder@debian.org>
Date
Jan 31, 2008, 09:16 UTC
Message-ID
<20080131091627.GB24403@artemis.madism.org>
  One of my co-workers stumbled upon a misfeature of the git config
parser. The following syntax is allowed:
    [section]
	 foo
  I saw that this is a feature, though as a consequence, the "value"
passed to git_config handlers may be NULL, and a _lot_ of git config
handlers don't know this could happen. This becomes an issue when you do
something like:
[user]
    name
--> every git command segfaults basically
[alias]
    foo
--> `git foo` segfaults
  I wanted to fix that, and generate nicer errors than a crash, changing
git_config to also take a boolean argument telling if the caller expects
"value" to be NULL, or would like to reject it, though the code has so
many callbacks to fix, and I have too little time right now, that I just
drop the thing on the list, hoping that some nice soul will take care of
the issue.
Cheers,
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Next: Junio C Hamano
Message 1 of 8 in “[bug] generic issue with git_config handlers”
  1. Pierre HabouzitJan 31, 2008
  2. Junio C HamanoJan 31, 2008
  3. Pierre HabouzitJan 31, 2008
  4. Christian CouderFeb 4, 2008
  5. Johannes SixtFeb 4, 2008
  6. Christian CouderFeb 4, 2008
  7. Junio C HamanoFeb 5, 2008
  8. Christian CouderFeb 7, 2008

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.