/
uis
/
git
/
x
/
uis
/
git
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove TYPE_* constant macros and use object_type enums consistently.
[git/git.git]
/
tree.c
diff --git
a/tree.c
b/tree.c
index
1023655
..
a6032e3
100644
(file)
--- a/
tree.c
+++ b/
tree.c
@@
-131,12
+131,12
@@
struct tree *lookup_tree(const unsigned char *sha1)
if (!obj) {
struct tree *ret = alloc_tree_node();
created_object(sha1, &ret->object);
if (!obj) {
struct tree *ret = alloc_tree_node();
created_object(sha1, &ret->object);
- ret->object.type =
TYPE
_TREE;
+ ret->object.type =
OBJ
_TREE;
return ret;
}
if (!obj->type)
return ret;
}
if (!obj->type)
- obj->type =
TYPE
_TREE;
- if (obj->type !=
TYPE
_TREE) {
+ obj->type =
OBJ
_TREE;
+ if (obj->type !=
OBJ
_TREE) {
error("Object %s is a %s, not a tree",
sha1_to_hex(sha1), typename(obj->type));
return NULL;
error("Object %s is a %s, not a tree",
sha1_to_hex(sha1), typename(obj->type));
return NULL;
@@
-216,11
+216,11
@@
struct tree *parse_tree_indirect(const unsigned char *sha1)
do {
if (!obj)
return NULL;
do {
if (!obj)
return NULL;
- if (obj->type ==
TYPE
_TREE)
+ if (obj->type ==
OBJ
_TREE)
return (struct tree *) obj;
return (struct tree *) obj;
- else if (obj->type ==
TYPE
_COMMIT)
+ else if (obj->type ==
OBJ
_COMMIT)
obj = &(((struct commit *) obj)->tree->object);
obj = &(((struct commit *) obj)->tree->object);
- else if (obj->type ==
TYPE
_TAG)
+ else if (obj->type ==
OBJ
_TAG)
obj = ((struct tag *) obj)->tagged;
else
return NULL;
obj = ((struct tag *) obj)->tagged;
else
return NULL;