#include "cache.h"
#include "blob.h"
#include "tree.h"
+#include "commit.h"
#include "quote.h"
#include "builtin.h"
int retval = 0;
const char *type = blob_type;
- if (S_ISDIR(mode)) {
+ if (S_ISDIRLNK(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))
chomp_prefix = 0;
break;
}
- if (!strncmp(argv[1]+2, "abbrev=",7)) {
+ if (!prefixcmp(argv[1]+2, "abbrev=")) {
abbrev = strtoul(argv[1]+9, NULL, 10);
if (abbrev && abbrev < MINIMUM_ABBREV)
abbrev = MINIMUM_ABBREV;