|
3 | 3 |
|
4 | 4 | #include "git-compat-util.h" |
5 | 5 | #include "refs.h" |
6 | | -#include "object-store.h" |
| 6 | +#include "odb.h" |
7 | 7 | #include "cache-tree.h" |
8 | 8 | #include "mergesort.h" |
9 | 9 | #include "commit.h" |
@@ -116,7 +116,7 @@ static void verify_working_tree_path(struct repository *r, |
116 | 116 | unsigned short mode; |
117 | 117 |
|
118 | 118 | if (!get_tree_entry(r, commit_oid, path, &blob_oid, &mode) && |
119 | | - oid_object_info(r, &blob_oid, NULL) == OBJ_BLOB) |
| 119 | + odb_read_object_info(r->objects, &blob_oid, NULL) == OBJ_BLOB) |
120 | 120 | return; |
121 | 121 | } |
122 | 122 |
|
@@ -277,7 +277,8 @@ static struct commit *fake_working_tree_commit(struct repository *r, |
277 | 277 | convert_to_git(r->index, path, buf.buf, buf.len, &buf, 0); |
278 | 278 | origin->file.ptr = buf.buf; |
279 | 279 | origin->file.size = buf.len; |
280 | | - pretend_object_file(the_repository, buf.buf, buf.len, OBJ_BLOB, &origin->blob_oid); |
| 280 | + odb_pretend_object(the_repository->objects, buf.buf, buf.len, |
| 281 | + OBJ_BLOB, &origin->blob_oid); |
281 | 282 |
|
282 | 283 | /* |
283 | 284 | * Read the current index, replace the path entry with |
@@ -1041,9 +1042,9 @@ static void fill_origin_blob(struct diff_options *opt, |
1041 | 1042 | &o->blob_oid, 1, &file->ptr, &file_size)) |
1042 | 1043 | ; |
1043 | 1044 | else |
1044 | | - file->ptr = repo_read_object_file(the_repository, |
1045 | | - &o->blob_oid, &type, |
1046 | | - &file_size); |
| 1045 | + file->ptr = odb_read_object(the_repository->objects, |
| 1046 | + &o->blob_oid, &type, |
| 1047 | + &file_size); |
1047 | 1048 | file->size = file_size; |
1048 | 1049 |
|
1049 | 1050 | if (!file->ptr) |
@@ -1245,7 +1246,7 @@ static int fill_blob_sha1_and_mode(struct repository *r, |
1245 | 1246 | return 0; |
1246 | 1247 | if (get_tree_entry(r, &origin->commit->object.oid, origin->path, &origin->blob_oid, &origin->mode)) |
1247 | 1248 | goto error_out; |
1248 | | - if (oid_object_info(r, &origin->blob_oid, NULL) != OBJ_BLOB) |
| 1249 | + if (odb_read_object_info(r->objects, &origin->blob_oid, NULL) != OBJ_BLOB) |
1249 | 1250 | goto error_out; |
1250 | 1251 | return 0; |
1251 | 1252 | error_out: |
@@ -2869,10 +2870,9 @@ void setup_scoreboard(struct blame_scoreboard *sb, |
2869 | 2870 | &sb->final_buf_size)) |
2870 | 2871 | ; |
2871 | 2872 | else |
2872 | | - sb->final_buf = repo_read_object_file(the_repository, |
2873 | | - &o->blob_oid, |
2874 | | - &type, |
2875 | | - &sb->final_buf_size); |
| 2873 | + sb->final_buf = odb_read_object(the_repository->objects, |
| 2874 | + &o->blob_oid, &type, |
| 2875 | + &sb->final_buf_size); |
2876 | 2876 |
|
2877 | 2877 | if (!sb->final_buf) |
2878 | 2878 | die(_("cannot read blob %s for path %s"), |
|
0 commit comments