diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-24 14:22:09 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-24 14:22:09 -0700 |
commit | c35dfe858991ee1969870d2da9337a1da567157e (patch) | |
tree | c7957a1345ea647b825c3a222d0c7e66cee2c311 /commit.c | |
parent | Set object type at object creation time, not object parse time. (diff) | |
download | tgif-c35dfe858991ee1969870d2da9337a1da567157e.tar.xz |
Verify that the object type matches for tree/commit objects even before parsing.
The type doesn't come from the parsing, the type also has to match the usage.
Diffstat (limited to 'commit.c')
-rw-r--r-- | commit.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -15,7 +15,7 @@ struct commit *lookup_commit(unsigned char *sha1) ret->object.type = commit_type; return ret; } - if (obj->parsed && obj->type != commit_type) { + if (obj->type != commit_type) { error("Object %s is a %s, not a commit", sha1_to_hex(sha1), obj->type); return NULL; |