Commits

Anonymous committed 90f5c18

builtin-log.c: guard config parser from value=NULL

format.suffix expects a string value. format.numbered is bool plus "auto"

Signed-off-by: Junio C Hamano <gitster@pobox.com>

  • Participants
  • Parent commits 3c17c34

Comments (0)

Files changed (1)

File builtin-log.c

 	}
 	if (!strcmp(var, "format.suffix")) {
 		if (!value)
-			die("format.suffix without value");
+			return config_error_nonbool(var);
 		fmt_patch_suffix = xstrdup(value);
 		return 0;
 	}
 		return 0;
 	}
 	if (!strcmp(var, "format.numbered")) {
-		if (!strcasecmp(value, "auto")) {
+		if (value && !strcasecmp(value, "auto")) {
 			auto_number = 1;
 			return 0;
 		}
-
 		numbered = git_config_bool(var, value);
 		return 0;
 	}