X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=ls-tree.c;h=e4ef200985030e8dee6f23dbe723bfa476160db0;hb=5edbcd8d778d81254d2c8a4229c76c6fa7880407;hp=97f09bdf81c9e665d392990d70714e40357036d1;hpb=cb85bfe5dfd7504dfee43ae49a76edb92e8d8eb0;p=git.git diff --git a/ls-tree.c b/ls-tree.c index 97f09bdf..e4ef2009 100644 --- a/ls-tree.c +++ b/ls-tree.c @@ -56,7 +56,7 @@ static int show_tree(unsigned char *sha1, const char *base, int baselen, const char *pathname, unsigned mode, int stage) { int retval = 0; - const char *type = "blob"; + const char *type = blob_type; if (S_ISDIR(mode)) { if (show_recursive(base, baselen, pathname)) { @@ -64,7 +64,7 @@ static int show_tree(unsigned char *sha1, const char *base, int baselen, if (!(ls_options & LS_SHOW_TREES)) return retval; } - type = "tree"; + type = tree_type; } else if (ls_options & LS_TREE_ONLY) return 0; @@ -90,6 +90,7 @@ int main(int argc, const char **argv) struct tree *tree; prefix = setup_git_directory(); + git_config(git_default_config); if (prefix && *prefix) chomp_prefix = strlen(prefix); while (1 < argc && argv[1][0] == '-') {