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

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

 



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(+)
Interdiff vs v1:

 diff --git a/builtin/replace.c b/builtin/replace.c
 index 02b13f6..b58c714 100644
 --- a/builtin/replace.c
 +++ b/builtin/replace.c
 @@ -440,6 +440,7 @@ int cmd_replace(int argc, const char **argv, const char *prefix)
  	};
  
  	check_replace_refs = 0;
 +	git_config(git_default_config, NULL);
  
  	argc = parse_options(argc, argv, prefix, options, git_replace_usage, 0);
  
 @@ -475,7 +476,6 @@ 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);


diff --git a/builtin/replace.c b/builtin/replace.c
index 748c6ca..b58c714 100644
--- a/builtin/replace.c
+++ b/builtin/replace.c
@@ -440,6 +440,7 @@ int cmd_replace(int argc, const char **argv, const char *prefix)
 	};
 
 	check_replace_refs = 0;
+	git_config(git_default_config, NULL);
 
 	argc = parse_options(argc, argv, prefix, options, git_replace_usage, 0);
 
-- 
2.8.1.207.g7b140d3
--
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]