diff --git a/editor.c b/editor.c
index 70618f106699ececf18357b63f1cf394d1f2f3bb..615f5754d66ba7ea611a4837b1ff802f9f9de598 100644 (file)
--- a/editor.c
+++ b/editor.c
#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");
return NULL;
if (!editor)
- editor = "vi";
+ editor = DEFAULT_EDITOR;
return editor;
}