|
2 | 2 | * Copyright (c) 2011, Google Inc. |
3 | 3 | */ |
4 | 4 |
|
5 | | -#define USE_THE_REPOSITORY_VARIABLE |
6 | | - |
7 | 5 | #include "git-compat-util.h" |
8 | 6 | #include "convert.h" |
9 | 7 | #include "environment.h" |
@@ -359,7 +357,7 @@ static int open_istream_pack_non_delta(struct odb_read_stream **out, |
359 | 357 |
|
360 | 358 | if (packfile_store_read_object_info(odb->packfiles, oid, &oi, 0) || |
361 | 359 | oi.u.packed.is_delta || |
362 | | - repo_settings_get_big_file_threshold(the_repository) >= size) |
| 360 | + repo_settings_get_big_file_threshold(odb->repo) >= size) |
363 | 361 | return -1; |
364 | 362 |
|
365 | 363 | in_pack_type = unpack_object_header(oi.u.packed.pack, |
@@ -518,16 +516,19 @@ struct odb_read_stream *open_istream(struct repository *r, |
518 | 516 | return st; |
519 | 517 | } |
520 | 518 |
|
521 | | -int stream_blob_to_fd(int fd, const struct object_id *oid, struct stream_filter *filter, |
522 | | - int can_seek) |
| 519 | +int odb_stream_blob_to_fd(struct object_database *odb, |
| 520 | + int fd, |
| 521 | + const struct object_id *oid, |
| 522 | + struct stream_filter *filter, |
| 523 | + int can_seek) |
523 | 524 | { |
524 | 525 | struct odb_read_stream *st; |
525 | 526 | enum object_type type; |
526 | 527 | unsigned long sz; |
527 | 528 | ssize_t kept = 0; |
528 | 529 | int result = -1; |
529 | 530 |
|
530 | | - st = open_istream(the_repository, oid, &type, &sz, filter); |
| 531 | + st = open_istream(odb->repo, oid, &type, &sz, filter); |
531 | 532 | if (!st) { |
532 | 533 | if (filter) |
533 | 534 | free_stream_filter(filter); |
|
0 commit comments