fix doc typos
[gitweb.git] / builtin-ls-tree.c
index ccba2aa8e1a635f14650e5ee0d91298593c300bc..7abe333ce99a3448373119c1a811341cb15f1d10 100644 (file)
@@ -62,7 +62,7 @@ static int show_tree(const unsigned char *sha1, const char *base, int baselen,
        const char *type = blob_type;
        unsigned long size;
 
-       if (S_ISDIRLNK(mode)) {
+       if (S_ISGITLINK(mode)) {
                /*
                 * Maybe we want to have some recursive version here?
                 *
@@ -112,10 +112,8 @@ static int show_tree(const unsigned char *sha1, const char *base, int baselen,
                               abbrev ? find_unique_abbrev(sha1, abbrev)
                                      : sha1_to_hex(sha1));
        }
-       write_name_quoted(base + chomp_prefix, baselen - chomp_prefix,
-                         pathname,
-                         line_termination, stdout);
-       putchar(line_termination);
+       write_name_quotedpfx(base + chomp_prefix, baselen - chomp_prefix,
+                         pathname, stdout, line_termination);
        return retval;
 }