Code

fix minor memory leak in get_tree_entry()
[git.git] / pager.c
diff --git a/pager.c b/pager.c
index 0b63d99fe770153bdfcc99d23ef45befc14d45b0..92c03f654abd0333bd0dd48b4aebf9ae42ac4de5 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -2,6 +2,10 @@
 #include "run-command.h"
 #include "sigchain.h"
 
+#ifndef DEFAULT_PAGER
+#define DEFAULT_PAGER "less"
+#endif
+
 /*
  * This is split up from the rest of git so that we can do
  * something different on Windows.
@@ -60,7 +64,7 @@ const char *git_pager(void)
        if (!pager)
                pager = getenv("PAGER");
        if (!pager)
-               pager = "less";
+               pager = DEFAULT_PAGER;
        else if (!*pager || !strcmp(pager, "cat"))
                pager = NULL;