Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
setup.c: guard config parser from value=NULL
author
Junio C Hamano
<gitster@pobox.com>
Mon, 11 Feb 2008 19:00:32 +0000
(11:00 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 11 Feb 2008 21:11:37 +0000
(13:11 -0800)
core.worktree expects a string value
Signed-off-by: Junio C Hamano <gitster@pobox.com>
setup.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
d2370cc
)
diff --git
a/setup.c
b/setup.c
index adede16a4deea1423f52c3b736de735d27f7172a..4509598d577baba8b1d7e8782d8e6ff8e74f9556 100644
(file)
--- a/
setup.c
+++ b/
setup.c
@@
-372,6
+372,8
@@
int check_repository_format_version(const char *var, const char *value)
if (is_bare_repository_cfg == 1)
inside_work_tree = -1;
} else if (strcmp(var, "core.worktree") == 0) {
+ if (!value)
+ return config_error_nonbool(var);
if (git_work_tree_cfg)
free(git_work_tree_cfg);
git_work_tree_cfg = xstrdup(value);