diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-04-29 09:52:17 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-04-29 10:08:12 -0700 |
| commit | 0b8ed25b66aedc9f4fe44d1a5cab2719290b22a9 (patch) | |
| tree | 65a7f303e6d38747541900fc449abc43288a70a1 /object-store.h | |
| parent | object-store: drop `loose_object_path()` (diff) | |
| download | git-0b8ed25b66aedc9f4fe44d1a5cab2719290b22a9.tar.gz git-0b8ed25b66aedc9f4fe44d1a5cab2719290b22a9.zip | |
object-store: move and rename `odb_pack_keep()`
The function `odb_pack_keep()` creates a file at the passed-in path. If
this fails, then the function re-tries by first creating any potentially
missing leading directories and then trying to create the file once
again. As such, this function doesn't host any kind of logic that is
specific to the object store, but is rather a generic helper function.
Rename the function to `safe_create_file_with_leading_directories()` and
move it into "path.c". While at it, refactor it so that it loses its
dependency on `the_repository`.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object-store.h')
| -rw-r--r-- | object-store.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/object-store.h b/object-store.h index 5668de62d0..aa8fc63043 100644 --- a/object-store.h +++ b/object-store.h @@ -189,13 +189,6 @@ void raw_object_store_clear(struct raw_object_store *o); */ int odb_mkstemp(struct strbuf *temp_filename, const char *pattern); -/* - * Create a pack .keep file named "name" (which should generally be the output - * of odb_pack_name). Returns a file descriptor opened for writing, or -1 on - * error. - */ -int odb_pack_keep(const char *name); - void *map_loose_object(struct repository *r, const struct object_id *oid, unsigned long *size); |
