Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] commit.c: guard config parser from value=NULL

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:12

"Govind Salinas" [off-list ref] writes:
-	if (!strcmp(var, "user.name")) {
+	if (value && !strcmp(var, "user.name")) {
 		strlcpy(git_default_name, value, sizeof(git_default_name));
 		return 0;
 	}
This is wrong, isn't it?  When somebody says

	[user]
        	name

we should not silently ignore it, but instead say "user.name is
not a bool!" and error out.

The same comment applies to all other

	if (value && !strcmp(var, "<varname>"))

conversions.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help