• Derrick Stolee's avatar
    csum-file: refactor finalize_hashfile() method · cfe83216
    Derrick Stolee authored
    If we want to use a hashfile on the temporary file for a lockfile, then
    we need finalize_hashfile() to fully write the trailing hash but also keep
    the file descriptor open.
    Do this by adding a new CSUM_HASH_IN_STREAM flag along with a functional
    change that checks this flag before writing the checksum to the stream.
    This differs from previous behavior since it would be written if either
    CSUM_CLOSE or CSUM_FSYNC is provided.
    Signed-off-by: Derrick Stolee's avatarDerrick Stolee <dstolee@microsoft.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
csum-file.h 1.34 KB