diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-17 23:19:32 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-17 23:19:32 (GMT) |
commit | 08ca0b04ba80b7127dd19b6d17c548eaca057ab3 (patch) | |
tree | a188dc51c655a0bf06035da38d6618e4fcb34d53 /rev-tree.c | |
parent | d0d7cbe730c31a6e1d12bd68975ff73c60f1de6c (diff) | |
download | git-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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.. |