diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-09-09 23:24:56 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-10 01:23:11 (GMT) |
commit | 2ec02dd5a8261bc837b961ef36788081ded5c2bc (patch) | |
tree | 3a6833d249e52901e8064c1865e47350b4462ff3 /pack.h | |
parent | 522a5c2cf542dedbdd51d08c1452b5cbdbbc2809 (diff) | |
download | git-2ec02dd5a8261bc837b961ef36788081ded5c2bc.zip git-2ec02dd5a8261bc837b961ef36788081ded5c2bc.tar.gz git-2ec02dd5a8261bc837b961ef36788081ded5c2bc.tar.bz2 |
pack-write: split up finish_tmp_packfile() function
Split up the finish_tmp_packfile() function and use the split-up version
in pack-objects.c in preparation for moving the step of renaming the
*.idx file later as part of a function change.
Since the only other caller of finish_tmp_packfile() was in
bulk-checkin.c, and it won't be needing a change to its *.idx renaming,
provide a thin wrapper for the old function as a static function in that
file. If other callers end up needing the simpler version it could be
moved back to "pack-write.c" and "pack.h".
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack.h')
-rw-r--r-- | pack.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -110,11 +110,14 @@ int encode_in_pack_object_header(unsigned char *hdr, int hdr_len, int read_pack_header(int fd, struct pack_header *); struct hashfile *create_tmp_packfile(char **pack_tmp_name); -void finish_tmp_packfile(struct strbuf *name_buffer, +void stage_tmp_packfiles(struct strbuf *name_buffer, const char *pack_tmp_name, struct pack_idx_entry **written_list, uint32_t nr_written, struct pack_idx_option *pack_idx_opts, - unsigned char sha1[]); + unsigned char hash[], + char **idx_tmp_name); +void rename_tmp_packfile_idx(struct strbuf *basename, + char **idx_tmp_name); #endif |