git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: git@vger.kernel.org
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Junio C Hamano <gitster@pobox.com>,
	Johannes Schindelin <johannes.schindelin@gmx.de>,
	Felipe Contreras <felipe.contreras@gmail.com>
Subject: [PATCH A v4 2/5] git config: trivial cleanup for editor action
Date: Sat, 21 Feb 2009 02:48:54 +0200	[thread overview]
Message-ID: <1235177337-2532-3-git-send-email-felipe.contreras@gmail.com> (raw)
In-Reply-To: <1235177337-2532-2-git-send-email-felipe.contreras@gmail.com>

From: Johannes Schindelin <johannes.schindelin@gmx.de>

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 builtin-config.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/builtin-config.c b/builtin-config.c
index afc4393..d52a057 100644
--- a/builtin-config.c
+++ b/builtin-config.c
@@ -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;
-- 
1.6.1.3

  reply	other threads:[~2009-02-21  0:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-21  0:48 [PATCH A v4 0/5] git config: cleanups Felipe Contreras
2009-02-21  0:48 ` [PATCH A v4 1/5] git config: codestyle cleanups Felipe Contreras
2009-02-21  0:48   ` Felipe Contreras [this message]
2009-02-21  0:48     ` [PATCH A v4 3/5] git_config(): not having a per-repo config file is not an error Felipe Contreras
2009-02-21  0:48       ` [PATCH A v4 4/5] git config: trivial rename in preparation for parseopt Felipe Contreras
2009-02-21  0:48         ` [PATCH A v4 5/5] git config: reorganize get_color* Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1235177337-2532-3-git-send-email-felipe.contreras@gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).