Robin Rosenberg <robin.rosenb...@dewire.com> writes: > @@ -566,6 +566,31 @@ static int git_default_core_config(const char *var, > const char *value) > trust_ctime = git_config_bool(var, value); > return 0; > } > + if (!strcmp(var, "core.ignorezerostat")) { > + char *copy, *tok; > + git_config_string(©, "core.ignorezerostat", value); > + check_nonzero_stat = CHECK_NONZERO_STAT_MASK; > + tok = strtok(value, ","); > + while (tok) { > + if (strcasecmp(tok, "uid") == 0) > + check_nonzero_stat &= ~CHECK_NONZERO_STAT_UID; > + else if (strcasecmp(tok, "gid") == 0) > + check_nonzero_stat &= ~CHECK_NONZERO_STAT_GID; > + else if (strcasecmp(tok, "ctime") == 0) { > + check_nonzero_stat &= ~CHECK_NONZERO_STAT_CTIME; > + trust_ctime = 0; > + } else if (strcasecmp(tok, "ino") == 0) > + check_nonzero_stat &= ~CHECK_NONZERO_STAT_INO; > + else if (strcasecmp(tok, "dev") == 0) > + check_nonzero_stat &= ~CHECK_NONZERO_STAT_DEV; > + else > + die_bad_config(var); > + tok = strtok(NULL, ","); > + } > + if (check_nonzero_stat >= CHECK_NONZERO_STAT_MASK) > + die_bad_config(var); > + free(copy); > + }
Also I am getting these: config.c: In function 'git_default_core_config': config.c:571: error: passing argument 1 of 'git_config_string' from incompatible pointer type config.c:540: note: expected 'const char **' but argument is of type 'char **' config.c:573: error: passing argument 1 of 'strtok' discards qualifiers from pointer target type -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html