Code

tag.h: Remove unused signature field
[git.git] / editor.c
index 70618f106699ececf18357b63f1cf394d1f2f3bb..615f5754d66ba7ea611a4837b1ff802f9f9de598 100644 (file)
--- a/editor.c
+++ b/editor.c
@@ -2,6 +2,10 @@
 #include "strbuf.h"
 #include "run-command.h"
 
+#ifndef DEFAULT_EDITOR
+#define DEFAULT_EDITOR "vi"
+#endif
+
 const char *git_editor(void)
 {
        const char *editor = getenv("GIT_EDITOR");
@@ -19,7 +23,7 @@ const char *git_editor(void)
                return NULL;
 
        if (!editor)
-               editor = "vi";
+               editor = DEFAULT_EDITOR;
 
        return editor;
 }