summaryrefslogtreecommitdiff
path: root/rev-tree.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-17 23:19:32 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-17 23:19:32 (GMT)
commit08ca0b04ba80b7127dd19b6d17c548eaca057ab3 (patch)
treea188dc51c655a0bf06035da38d6618e4fcb34d53 /rev-tree.c
parentd0d7cbe730c31a6e1d12bd68975ff73c60f1de6c (diff)
downloadgit-08ca0b04ba80b7127dd19b6d17c548eaca057ab3.zip
git-08ca0b04ba80b7127dd19b6d17c548eaca057ab3.tar.gz
git-08ca0b04ba80b7127dd19b6d17c548eaca057ab3.tar.bz2
Make the revision tracking track the object types too.
This allows fsck to verify not just that an object exists, but also that it has the type it was expected to have.
Diffstat (limited to 'rev-tree.c')
-rw-r--r--rev-tree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rev-tree.c b/rev-tree.c
index fe114ab..3c54769 100644
--- a/rev-tree.c
+++ b/rev-tree.c
@@ -37,7 +37,7 @@ static void read_cache_file(const char *path)
break;
if (get_sha1_hex(buf+1, sha1))
break;
- rev = lookup_rev(sha1);
+ rev = lookup_rev(sha1, "commit");
rev->flags |= SEEN;
rev->date = date;
@@ -46,7 +46,7 @@ static void read_cache_file(const char *path)
unsigned char parent[20];
if (get_sha1_hex(buf + 1, parent))
break;
- add_relationship(rev, parent);
+ add_relationship(rev, parent, "commit");
}
}
fclose(file);
@@ -127,7 +127,7 @@ int main(int argc, char **argv)
* Now we have the maximal tree. Walk the different sha files back to the root.
*/
for (i = 0; i < nr; i++)
- mark_reachable(lookup_rev(sha1[i]), 1 << i);
+ mark_reachable(lookup_rev(sha1[i], "commit"), 1 << i);
/*
* Now print out the results..