Oh, I didn't notice that:
Died at /usr/lib/git-core/git-send-email line 1665.
Will resend very soon.
Show 34 quoted lines
>>
>> -static void git_apply_config(void)
>> +static void git_apply_config(struct repository *repo)
>> {
>> - repo_config_get_string(the_repository, "apply.whitespace", &apply_default_whitespace);
>> - repo_config_get_string(the_repository, "apply.ignorewhitespace", &apply_default_ignorewhitespace);
>> - repo_config(the_repository, git_xmerge_config, NULL);
>> + struct repo_config_values *cfg = repo_config_values(repo);
>> +
>> + FREE_AND_NULL(cfg->apply_default_whitespace);
>> + repo_config_get_string(repo, "apply.whitespace",
>> + &cfg->apply_default_whitespace);
>> + FREE_AND_NULL(cfg->apply_default_ignorewhitespace);
>> + repo_config_get_string(repo, "apply.ignorewhitespace",
>> + &cfg->apply_default_ignorewhitespace);
>> + repo_config(repo, git_xmerge_config, NULL);
>> }
>
> OK.
>
>> static int parse_whitespace_option(struct apply_state *state, const char *option)
>> @@ -126,10 +132,15 @@ int init_apply_state(struct apply_state *state,
>> strset_init(&state->kept_symlinks);
>> strbuf_init(&state->root, 0);
>>
>> - git_apply_config();
>> - if (apply_default_whitespace && parse_whitespace_option(state, apply_default_whitespace))
>> + git_apply_config(repo);
>> +
>> + struct repo_config_values *cfg = repo_config_values(repo);
>
> Doesn't "-Wdeclaration-after-statement" complain on this, declaring cfg
> after calling "git_apply_config(repo)" on the line before?
>