transport-helper: release strbuf after use in process_connect_service()
[gitweb.git] / builtin / var.c
index 0744bb83185289e26bd32b3b2ecaec717d8c75d7..6c6f46b4aeaf658f4de9dc02895a2b19a5c7c5a8 100644 (file)
@@ -3,8 +3,8 @@
  *
  * Copyright (C) Eric Biederman, 2005
  */
-#include "cache.h"
-#include "exec_cmd.h"
+#include "builtin.h"
+#include "config.h"
 
 static const char var_usage[] = "git var (-l | <variable>)";
 
@@ -12,7 +12,7 @@ static const char *editor(int flag)
 {
        const char *pgm = git_editor();
 
-       if (!pgm && flag & IDENT_ERROR_ON_NO_NAME)
+       if (!pgm && flag & IDENT_STRICT)
                die("Terminal is dumb, but EDITOR unset");
 
        return pgm;
@@ -56,7 +56,7 @@ static const char *read_var(const char *var)
        val = NULL;
        for (ptr = git_vars; ptr->read; ptr++) {
                if (strcmp(var, ptr->name) == 0) {
-                       val = ptr->read(IDENT_ERROR_ON_NO_NAME);
+                       val = ptr->read(IDENT_STRICT);
                        break;
                }
        }