Subject: Re: [PATCH 02/18] config: Introduce functions to write non-standard file

From: Jonathan Nieder <[email-masked]>
Date: Wed, 27 Jul 2011 05:39:56 +0200

Ramkumar Ramachandra wrote:

> --- a/config.c
> +++ b/config.c
> @@ -1387,6 +1387,24 @@ write_err_out:
>  
>  }
>  
> +int git_config_set_multivar(const char *key, const char *value,
> +			const char *value_regex, int multi_replace)
> +{
> +	const char *config_filename;
> +	char *filename_buf = NULL;
> +	int ret;
> +
> +	if (config_exclusive_filename)
> +		config_filename = config_exclusive_filename;
> +	else
> +		config_filename = filename_buf = git_pathdup("config");

I know my sloppy example before is to blame for this, but the
"filename_buf" variable name is needlessly verbose --- its semantics
are just that it is something to be free()ed.  So if I were submitting
this I would use "buf".

The change description needs copyediting.

Anyway, with or without the variable name change,
Reviewed-by: Jonathan Nieder <[email-masked]>

Thanks.  Patch 1 also looks sensible.