Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--object.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/object.c b/object.c
index b2319f6246..69fbbbf504 100644
--- a/object.c
+++ b/object.c
@@ -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;
}