Export launch_editor() and make it accept ':' as a no-op editor.
[gitweb.git] / builtin-tag.c
index cbb0f04e85627a5509bb2ba8cbf04a54d4d20c41..88a5449e67c9220564fe3461b9f99dc1fd41e9b4 100644 (file)
@@ -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;