Export launch_editor() and make it accept ':' as a no-op editor.
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
d63c2fd192
commit
943316e96c
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user