libgit2/libgit2 — pull request #1068 by carlosmn (2012-11-13 22:57:07+00:00)
Title: Deal with empty and nonexsitent values in config

Configurations like `[section] var1` and `[section] var2 =` aren't handled very gracefully. `git_config_get_int32(..., "section.var1")` segfaults because `git_config_get_string()` gives it `NULL` as the string.

So get rid of that and other user-facing edge cases by passing up an empty string and correctly handle boolean parsing for `section.var2`. `var1` is true, but `var2` is false. This happens to be undocumented, but it's included in git's config tests.