From 943316e96ca2dad67086af2f945e42467a27ddd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Fri, 2 Nov 2007 11:33:08 -0400 Subject: Export launch_editor() and make it accept ':' as a no-op editor. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kristian Høgsberg Signed-off-by: Junio C Hamano --- builtin-tag.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'builtin-tag.c') diff --git a/builtin-tag.c b/builtin-tag.c index cbb0f04e8..88a5449e6 100644 --- a/builtin-tag.c +++ b/builtin-tag.c @@ -17,7 +17,7 @@ static const char builtin_tag_usage[] = static char signingkey[1000]; -static void launch_editor(const char *path, struct strbuf *buffer) +void launch_editor(const char *path, struct strbuf *buffer) { const char *editor, *terminal; struct child_process child; @@ -42,6 +42,9 @@ static void launch_editor(const char *path, struct strbuf *buffer) if (!editor) editor = "vi"; + if (!strcmp(editor, ":")) + return; + memset(&child, 0, sizeof(child)); child.argv = args; args[0] = editor; -- cgit v1.2.1