Merge branch 'wk/merge-options-gpg-sign-doc'
[gitweb.git] / builtin / hash-object.c
index 1c0f0f332796f00bbd2705c0eb67aeab2be3809b..c532ff9320c751d1db5475add51f2c3c6a8c7146 100644 (file)
@@ -24,7 +24,7 @@ static int hash_literally(struct object_id *oid, int fd, const char *type, unsig
        if (strbuf_read(&buf, fd, 4096) < 0)
                ret = -1;
        else
-               ret = hash_sha1_file_literally(buf.buf, buf.len, type, oid->hash, flags);
+               ret = hash_sha1_file_literally(buf.buf, buf.len, type, oid, flags);
        strbuf_release(&buf);
        return ret;
 }
@@ -38,7 +38,7 @@ static void hash_fd(int fd, const char *type, const char *path, unsigned flags,
        if (fstat(fd, &st) < 0 ||
            (literally
             ? hash_literally(&oid, fd, type, flags)
-            : index_fd(oid.hash, fd, &st, type_from_string(type), path, flags)))
+            : index_fd(&oid, fd, &st, type_from_string(type), path, flags)))
                die((flags & HASH_WRITE_OBJECT)
                    ? "Unable to add %s to database"
                    : "Unable to hash %s", path);