Skip to content

Commit

Permalink
git config: trivial cleanup for editor action
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Feb 22, 2009
1 parent 4b951b7 commit 414f2e5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions builtin-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,15 +363,12 @@ int cmd_config(int argc, const char **argv, const char *prefix)
} else if (!strcmp(argv[1], "--get-colorbool")) {
return get_colorbool(argc-2, argv+2);
} else if (!strcmp(argv[1], "--edit") || !strcmp(argv[1], "-e")) {
const char *config_filename;
if (argc != 2)
usage(git_config_set_usage);
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);
return 0;
} else
break;
Expand Down

0 comments on commit 414f2e5

Please sign in to comment.