]> git.ipfire.org Git - thirdparty/git.git/commit - archive.h
archive: read short blobs in archive.c::write_archive_entry()
authorRené Scharfe <l.s.r@web.de>
Sat, 19 Sep 2020 21:23:32 +0000 (23:23 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sat, 19 Sep 2020 22:56:05 +0000 (15:56 -0700)
commit200589abcb4d7f107ed9da85e43b9a7268016c23
tree1b9e0829b242a6a1439ee9b115700842460737ad
parent385c171a018f2747b329bcfa6be8eda1709e5abd
archive: read short blobs in archive.c::write_archive_entry()

Centralize reading of symlink destinations and the contents of regular
files that are too small to be streamed.  This reduces code duplication
and allows future patches to add support for adding non-tracked files to
archives.  The backends are expected to stream blobs if buffer is NULL.

object_file_to_archive() is only called from archive.c and thus no
longer exported.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
archive-tar.c
archive-zip.c
archive.c
archive.h