diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-05-12 14:22:48 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-05-12 14:22:49 -0700 |
| commit | bd99d6e8db5e2c56dd24395e9711ee7ee564bf4f (patch) | |
| tree | b80e6131d230f068d29be426103f2b7fd87150b1 /builtin/index-pack.c | |
| parent | Merge branch 'ag/send-email-outlook' (diff) | |
| parent | object-store: drop `repo_has_object_file()` (diff) | |
| download | git-bd99d6e8db5e2c56dd24395e9711ee7ee564bf4f.tar.gz git-bd99d6e8db5e2c56dd24395e9711ee7ee564bf4f.zip | |
Merge branch 'ps/object-store-cleanup'
Further code clean-up in the object-store layer.
* ps/object-store-cleanup:
object-store: drop `repo_has_object_file()`
treewide: convert users of `repo_has_object_file()` to `has_object()`
object-store: allow fetching objects via `has_object()`
object-store: move function declarations to their respective subsystems
object-store: move and rename `odb_pack_keep()`
object-store: drop `loose_object_path()`
object-store: move `struct packed_git` into "packfile.h"
Diffstat (limited to 'builtin/index-pack.c')
| -rw-r--r-- | builtin/index-pack.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 60a8ee05db..147e9b8b47 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -892,9 +892,8 @@ static void sha1_object(const void *data, struct object_entry *obj_entry, if (startup_info->have_repository) { read_lock(); - collision_test_needed = - repo_has_object_file_with_flags(the_repository, oid, - OBJECT_INFO_QUICK); + collision_test_needed = has_object(the_repository, oid, + HAS_OBJECT_FETCH_PROMISOR); read_unlock(); } @@ -1565,7 +1564,7 @@ static void write_special_file(const char *suffix, const char *msg, else filename = odb_pack_name(the_repository, &name_buf, hash, suffix); - fd = odb_pack_keep(filename); + fd = safe_create_file_with_leading_directories(the_repository, filename); if (fd < 0) { if (errno != EEXIST) die_errno(_("cannot write %s file '%s'"), |
