diff options
author | Junio C Hamano <junkio@cox.net> | 2006-06-17 18:56:08 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-06-17 18:56:08 -0700 |
commit | 8a02ad4f440da05097416e7ca719360b05d23dbf (patch) | |
tree | c57cbc108f4e6c5c1c3338545fb9eccf3a2aad52 /commit.c | |
parent | Merge branch 'js/diff' (diff) | |
parent | Fix git-format-patch -s (diff) | |
download | tgif-8a02ad4f440da05097416e7ca719360b05d23dbf.tar.xz |
Merge branch 'eb/mail' into next
* eb/mail:
Fix git-format-patch -s
Some more memory leak avoidance
Move "void *util" from "struct object" into "struct commit"
Shrink "struct object" a bit
Diffstat (limited to 'commit.c')
-rw-r--r-- | commit.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -56,10 +56,10 @@ static struct commit *check_commit(struct object *obj, const unsigned char *sha1, int quiet) { - if (obj->type != commit_type) { + if (obj->type != TYPE_COMMIT) { if (!quiet) error("Object %s is a %s, not a commit", - sha1_to_hex(sha1), obj->type); + sha1_to_hex(sha1), typename(obj->type)); return NULL; } return (struct commit *) obj; @@ -86,11 +86,11 @@ struct commit *lookup_commit(const unsigned char *sha1) if (!obj) { struct commit *ret = xcalloc(1, sizeof(struct commit)); created_object(sha1, &ret->object); - ret->object.type = commit_type; + ret->object.type = TYPE_COMMIT; return ret; } if (!obj->type) - obj->type = commit_type; + obj->type = TYPE_COMMIT; return check_commit(obj, sha1, 0); } @@ -711,12 +711,12 @@ int count_parents(struct commit * commit) void topo_sort_default_setter(struct commit *c, void *data) { - c->object.util = data; + c->util = data; } void *topo_sort_default_getter(struct commit *c) { - return c->object.util; + return c->util; } /* |