diff options
| author | Russell Belfer <rb@github.com> | 2013-08-08 12:57:13 -0700 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2013-08-08 12:57:13 -0700 |
| commit | 7f7ebe13c458217dcae419914dd15b434f513373 (patch) | |
| tree | 86b4483cca59656ba2684bc7c733da910c1d24c3 /src/config_file.c | |
| parent | 5e96f31638fe71a0c76805b1352f437881791d98 (diff) | |
| parent | c57f668268744cbccb13c30095a0c1649fb18a63 (diff) | |
| download | libgit2-7f7ebe13c458217dcae419914dd15b434f513373.tar.gz | |
Merge pull request #1771 from nvloff/write_empty_config_value
config: allow setting empty string as value
Diffstat (limited to 'src/config_file.c')
| -rw-r--r-- | src/config_file.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/config_file.c b/src/config_file.c index 570f286c8..1d7b4fb38 100644 --- a/src/config_file.c +++ b/src/config_file.c @@ -1304,6 +1304,9 @@ static char *escape_value(const char *ptr) assert(ptr); len = strlen(ptr); + if (!len) + return git__calloc(1, sizeof(char)); + git_buf_grow(&buf, len); while (*ptr != '\0') { |
