Re: [PATCH 02/18] config: Introduce functions to write non-standard file
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jul 27, 2011, 03:39 UTC
- Message-ID
- <20110727033956.GA18470@elie>
- In-Reply-To
- <1311736755-24205-3-git-send-email-artagnon@gmail.com>
Ramkumar Ramachandra wrote:
Show 17 quoted lines
> --- 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 <jrnieder@gmail.com>
Thanks. Patch 1 also looks sensible.