• S
    Allow parse_pack_index on temporary files · 7b64469a
    Shawn O. Pearce 提交于
    The easiest way to verify a pack index is to open it through the
    standard parse_pack_index function, permitting the header check
    to happen when the file is mapped.  However, the dumb HTTP client
    needs to verify a pack index before its moved into its proper file
    name within the objects/pack directory, to prevent a corrupt index
    from being made available.  So permit the caller to specify the
    exact path of the index file.
    
    For now we're still using the final destination name within the
    sole call site in http.c, but eventually we will start to parse
    the temporary path instead.
    Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    7b64469a
sha1_file.c 63.5 KB