summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e098368)
raw | patch | inline | side by side (parent: e098368)
author | Junio C Hamano <gitster@pobox.com> | |
Mon, 11 Feb 2008 19:00:10 +0000 (11:00 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 11 Feb 2008 21:11:37 +0000 (13:11 -0800) |
branch.*.{remote,merge} expect a string value
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote.c | patch | blob | history |
diff --git a/remote.c b/remote.c
index 0e006804ef3cc190fa286c85e2de034a33791886..20abbc07acb2e48aefb2129683b5dc159661211e 100644 (file)
--- a/remote.c
+++ b/remote.c
subkey = strrchr(name, '.');
if (!subkey)
return 0;
- if (!value)
- return 0;
branch = make_branch(name, subkey - name);
if (!strcmp(subkey, ".remote")) {
+ if (!value)
+ return config_error_nonbool(key);
branch->remote_name = xstrdup(value);
if (branch == current_branch)
default_remote_name = branch->remote_name;
- } else if (!strcmp(subkey, ".merge"))
+ } else if (!strcmp(subkey, ".merge")) {
+ if (!value)
+ return config_error_nonbool(key);
add_merge(branch, xstrdup(value));
+ }
return 0;
}
if (prefixcmp(key, "remote."))