diff options
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -163,6 +163,8 @@ void *object_as_type(struct object *obj, enum object_type type, int quiet) if (obj->type == type) return obj; else if (obj->type == OBJ_NONE) { + if (type == OBJ_COMMIT) + ((struct commit *)obj)->index = alloc_commit_index(); obj->type = type; return obj; } |