X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=ls-tree.c;h=e4ef200985030e8dee6f23dbe723bfa476160db0;hb=2448482b3d5e265dd29fa38c3827565f6f2f31ec;hp=97f09bdf81c9e665d392990d70714e40357036d1;hpb=c816a6bc5a8494556e00c36d4ed4596a04efd38a;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] == '-') {