summaryrefslogtreecommitdiffstats
path: root/refs.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-07-22 19:59:24 +0200
committerJunio C Hamano <gitster@pobox.com>2014-07-22 19:59:25 +0200
commit10b944b37b11d6e0597541efdd1fa23c0eecbeff (patch)
tree2cbd3d48b1f08edee38c565984aaccdca325ef43 /refs.c
parentMerge branch 'kb/perf-trace' (diff)
parentdiff-tree: avoid lookup_unknown_object (diff)
downloadgit-10b944b37b11d6e0597541efdd1fa23c0eecbeff.tar.xz
git-10b944b37b11d6e0597541efdd1fa23c0eecbeff.zip
Merge branch 'jk/alloc-commit-id'
Make sure all in-core commit objects are assigned a unique number so that they can be annotated using the commit-slab API. * jk/alloc-commit-id: diff-tree: avoid lookup_unknown_object object_as_type: set commit index alloc: factor out commit index add object_as_type helper for casting objects parse_object_buffer: do not set object type move setting of object->type to alloc_* functions alloc: write out allocator definitions alloc.c: remove the alloc_raw_commit_node() function
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/refs.c b/refs.c
index 3792314f3b..84b9070b8d 100644
--- a/refs.c
+++ b/refs.c
@@ -1741,9 +1741,8 @@ static enum peel_status peel_object(const unsigned char *name, unsigned char *sh
if (o->type == OBJ_NONE) {
int type = sha1_object_info(name, NULL);
- if (type < 0)
+ if (type < 0 || !object_as_type(o, type, 0))
return PEEL_INVALID;
- o->type = type;
}
if (o->type != OBJ_TAG)