summaryrefslogtreecommitdiff
path: root/builtin-fsck.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-04-21 17:21:10 -0700
committerJunio C Hamano <junkio@cox.net>2007-04-21 17:21:10 -0700
commitafb5b6a24bd333d298d10acac731f1c127bbb82d (patch)
tree9c403d4fa96f00d172e5b0a95602b68be839086f /builtin-fsck.c
parent99ebd06c18fdb7f8274db6cca456a95942916bb6 (diff)
parent1c3e5c4ebc326c5c70350d3f4dc7f2b29e813480 (diff)
downloadgit-afb5b6a24bd333d298d10acac731f1c127bbb82d.tar.gz
Merge branch 'lt/gitlink'
* lt/gitlink: Tests for core subproject support Expose subprojects as special files to "git diff" machinery Fix some "git ls-files -o" fallout from gitlinks Teach "git-read-tree -u" to check out submodules as a directory Teach git list-objects logic to not follow gitlinks Fix gitlink index entry filesystem matching Teach "git-read-tree -u" to check out submodules as a directory Teach git list-objects logic not to follow gitlinks Don't show gitlink directories when we want "other" files Teach git-update-index about gitlinks Teach directory traversal about subprojects Fix thinko in subproject entry sorting Teach core object handling functions about gitlinks Teach "fsck" not to follow subproject links Add "S_IFDIRLNK" file mode infrastructure for git links Add 'resolve_gitlink_ref()' helper function Avoid overflowing name buffer in deep directory structures diff-lib: use ce_mode_from_stat() rather than messing with modes manually
Diffstat (limited to 'builtin-fsck.c')
-rw-r--r--builtin-fsck.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/builtin-fsck.c b/builtin-fsck.c
index f480e700e9..fcb8ed5af1 100644
--- a/builtin-fsck.c
+++ b/builtin-fsck.c
@@ -253,6 +253,7 @@ static int fsck_tree(struct tree *item)
case S_IFREG | 0644:
case S_IFLNK:
case S_IFDIR:
+ case S_IFDIRLNK:
break;
/*
* This is nonstandard, but we had a few of these
@@ -703,8 +704,14 @@ int cmd_fsck(int argc, char **argv, const char *prefix)
int i;
read_cache();
for (i = 0; i < active_nr; i++) {
- struct blob *blob = lookup_blob(active_cache[i]->sha1);
+ unsigned int mode;
+ struct blob *blob;
struct object *obj;
+
+ mode = ntohl(active_cache[i]->ce_mode);
+ if (S_ISDIRLNK(mode))
+ continue;
+ blob = lookup_blob(active_cache[i]->sha1);
if (!blob)
continue;
obj = &blob->object;