• Duy Nguyen's avatar
    archive-tar: turn write_tar_entry into blob-writing only · d240d410
    Duy Nguyen authored
    Before this patch write_tar_entry() can:
     - write global header
       by write_global_extended_header() calling write_tar_entry with
       with both sha1 and path == NULL
     - write extended header for symlinks, by write_tar_entry() calling
       itself with sha1 != NULL and path == NULL
     - write a normal blob. In this case both sha1 and path are valid.
    After this patch, the first two call sites are modified to write the
    header without calling write_tar_entry(). The function is now for
    writing blobs only. This simplifies handling when write_tar_entry()
    learns about large blobs.
    Signed-off-by: Duy Nguyen's avatarNguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
archive-tar.c 9.9 KB