git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bug] generic issue with git_config handlers
@ 2008-01-31  9:16 Pierre Habouzit
  2008-01-31  9:25 ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Pierre Habouzit @ 2008-01-31  9:16 UTC (permalink / raw)
  To: Git ML

[-- Attachment #1: Type: text/plain, Size: 1056 bytes --]


  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

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-02-07  5:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-31  9:16 [bug] generic issue with git_config handlers Pierre Habouzit
2008-01-31  9:25 ` Junio C Hamano
2008-01-31 10:10   ` Pierre Habouzit
2008-02-04  6:27     ` Christian Couder
2008-02-04 17:01       ` Johannes Sixt
2008-02-04 23:13         ` Christian Couder
2008-02-05  0:03           ` Junio C Hamano
2008-02-07  5:45             ` Christian Couder

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).