summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d32987b)
raw | patch | inline | side by side (parent: d32987b)
author | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Sun, 24 Apr 2005 21:22:09 +0000 (14:22 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Sun, 24 Apr 2005 21:22:09 +0000 (14:22 -0700) |
The type doesn't come from the parsing, the type also has to match the usage.
commit.c | patch | blob | history | |
tree.c | patch | blob | history |
diff --git a/commit.c b/commit.c
index c0dd689ea3be3ef8d161cac056350e61851e7f64..c6fdfd49197df99cdabf761e8e307f781a45086d 100644 (file)
--- a/commit.c
+++ b/commit.c
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;
index 23476da7deb4eaa98a7f872eed4981b274904af7..3537c115584e66309f50447d6e89404bd4631519 100644 (file)
--- a/tree.c
+++ b/tree.c
ret->object.type = tree_type;
return ret;
}
- if (obj->parsed && obj->type != tree_type) {
+ if (obj->type != tree_type) {
error("Object %s is a %s, not a tree",
sha1_to_hex(sha1), obj->type);
return NULL;