X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=builtin-ls-tree.c;h=9a5977fb99c3c61522fee3678fb94b1815575c61;hb=bc32fed5516375ef78bc0f6270eb57bf1bb12d47;hp=6472610ac2fecb8096ecab8fe29331a6fd6c009b;hpb=4b22f634a3f1752d98e1fc5eee4fa7ce0efe157c;p=git.git diff --git a/builtin-ls-tree.c b/builtin-ls-tree.c index 6472610ac..9a5977fb9 100644 --- a/builtin-ls-tree.c +++ b/builtin-ls-tree.c @@ -6,6 +6,7 @@ #include "cache.h" #include "blob.h" #include "tree.h" +#include "commit.h" #include "quote.h" #include "builtin.h" @@ -59,7 +60,24 @@ static int show_tree(const unsigned char *sha1, const char *base, int baselen, int retval = 0; const char *type = blob_type; - if (S_ISDIR(mode)) { + if (S_ISGITLINK(mode)) { + /* + * Maybe we want to have some recursive version here? + * + * Something like: + * + if (show_subprojects(base, baselen, pathname)) { + if (fork()) { + chdir(base); + exec ls-tree; + } + waitpid(); + } + * + * ..or similar.. + */ + type = commit_type; + } else if (S_ISDIR(mode)) { if (show_recursive(base, baselen, pathname)) { retval = READ_TREE_RECURSIVE; if (!(ls_options & LS_SHOW_TREES))