Re: [PATCH] replace --edit: respect core.editor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"git blame -L475,6 builtin/replace.c" points at b892bb45 (replace:
add --edit option, 2014-04-26) and the commit log message names two
people who can review this change, so that is what I am doing here.

Johannes Schindelin <johannes.schindelin@xxxxxx> writes:

> We simply need to read the config, is all.
>
> This fixes https://github.com/git-for-windows/git/issues/733
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@xxxxxx>
> ---
>  builtin/replace.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/builtin/replace.c b/builtin/replace.c
> index 748c6ca..02b13f6 100644
> --- a/builtin/replace.c
> +++ b/builtin/replace.c
> @@ -475,6 +475,7 @@ int cmd_replace(int argc, const char **argv, const char *prefix)
>  		return replace_object(argv[0], argv[1], force);
>  
>  	case MODE_EDIT:
> +		git_config(git_default_config, NULL);
>  		if (argc != 1)
>  			usage_msg_opt("-e needs exactly one argument",
>  				      git_replace_usage, options);

The placement of git_config() makes me wonder why.

I can understand "we only know edit mode needs config, and we know
it will never affect other modes to have the new call here", and it
would be good for an emergency patch for ancient maintenance track
that will not get any other changes or enhancements.  I do not think
it is a sound reasoning to maintain the codefor the longer term,
though.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]