Re: [PATCH v3 11/11] http-fetch: Use temporary files for pack-*.idx until verified

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sat, 17 Apr 2010 13:07:44 -0700
"Shawn O. Pearce" <spearce@xxxxxxxxxxx> wrote:

> Verify that a downloaded pack-*.idx file is consistent and valid
> as an index file before we rename it into its final destination.
> This prevents a corrupt index file from later being treated as a
> usable file, confusing readers.

Perhaps this should be added in:

  Check that we do not have the pack index file before invoking
  fetch_and_setup_pack_index(); that way, we can do without the
  has_pack_index() check in fetch_and_setup_pack_index().

The above was referring to this hunk:

> diff --git a/http.c b/http.c
[snip]
> -	if (has_pack_index(sha1)) {
> -		ret = 0;
> -		goto cleanup;
> -	}
> -

-- 
Cheers,
Ray Chuan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]