Thread (11 messages) flat view 11 messages, 2 authors, 2016-06-15
DORMANTno replies

[PATCH v2 8/8] config: Cleanup editor action.

From: Felipe Contreras <hidden>
Date: 2016-06-15 22:46:13
Subsystem: the rest · Maintainer: Linus Torvalds

Copy-paste from Johannes Schindelin.

Signed-off-by: Felipe Contreras <redacted>
---
 builtin-config.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/builtin-config.c b/builtin-config.c
index ff9e029..bc97854 100644
--- a/builtin-config.c
+++ b/builtin-config.c
@@ -369,13 +369,10 @@ int cmd_config(int argc, const char **argv, const char *unused_prefix)
 	}
 	else if (actions & ACTION_EDIT) {
 		check_argc(argc, 0, 0);
-		const char *config_filename;
-		if (config_exclusive_filename)
-			config_filename = config_exclusive_filename;
-		else
-			config_filename = git_path("config");
 		git_config(git_default_config, NULL);
-		launch_editor(config_filename, NULL, NULL);
+		launch_editor(config_exclusive_filename ?
+			      config_exclusive_filename : git_path("config"),
+			      NULL, NULL);
 	}
 	else if (actions & ACTION_ADD) {
 		check_argc(argc, 2, 2);
-- 
1.6.1.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help