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:
Diffstat (limited to 'object.c')
-rw-r--r--object.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/object.c b/object.c
index e680d881a4..fe22223566 100644
--- a/object.c
+++ b/object.c
@@ -182,9 +182,12 @@ struct object *lookup_unknown_object(const unsigned char *sha1)
struct object *parse_object_buffer(const unsigned char *sha1, enum object_type type, unsigned long size, void *buffer, int *eaten_p)
{
+ struct object_id oid;
struct object *obj;
*eaten_p = 0;
+ hashcpy(oid.hash, sha1);
+
obj = NULL;
if (type == OBJ_BLOB) {
struct blob *blob = lookup_blob(sha1);
@@ -206,7 +209,7 @@ struct object *parse_object_buffer(const unsigned char *sha1, enum object_type t
}
}
} else if (type == OBJ_COMMIT) {
- struct commit *commit = lookup_commit(sha1);
+ struct commit *commit = lookup_commit(&oid);
if (commit) {
if (parse_commit_buffer(commit, buffer, size))
return NULL;