git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sf <sf@b-i-t.de>
To: git@vger.kernel.org
Subject: Re: [PATCH] git-http-fetch: Allow caching of retrieved objects byproxy servers
Date: Tue, 20 Sep 2005 13:34:22 +0200	[thread overview]
Message-ID: <432FF3BE.8060501@b-i-t.de> (raw)
In-Reply-To: <20050919133508.GA2903@pasky.or.cz>

Petr Baudis wrote:
> Dear diary, on Mon, Sep 19, 2005 at 12:24:45PM CEST, I got a letter
> where sf <sf@b-i-t.de> told me that...
...
>> The OP assumed that "files in a GIT repository are immutable" which is 
>> not true. If you consider the sequence
>> 
>> pack -> prune -> update zlib or git -> unpack
>> 
>> you can end up with different files if the new zlib implementation 
>> changes imcompatibly (with respect to byte-by-byte compression results) 
>> or if git suddenly does not use the default compression level any more.
> 
> Yes, but why should this matter? It shouldn't matter if you get the old
> "version" or the new version of the file over HTTP, the actual object's
> contents is still the same, and GIT shouldn't care.
> 

This is correct as long as you take care to always get each file in one go.

Recently there was talk about how git handles objects larger than 4GB. 
But you do not have to go this far. Think about fetching 1MB (or 10MB or 
100MB) compressed objects over a slow link. If the transfer gets 
interrupted some people or some clever piece of software - perhaps even 
in git-core - might try to continue the interrupted download. Now if the 
file representation has changed in the meantime the downloaded file is 
going to be corrupt.

The git tools will of course take note of the corruption but then the 
head scratching begins: "What went wrong?"

The more I think about this I realize that my worries have nothing to do 
with caching but with HTTP fetching in general.

Regards

	Stephan

      reply	other threads:[~2005-09-20 11:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-13 15:38 [PATCH] git-http-fetch: Allow caching of retrieved objects by proxy servers Sergey Vlasov
2005-09-13 15:59 ` Junio C Hamano
2005-09-14 13:12   ` Sergey Vlasov
2005-09-14 16:28     ` Junio C Hamano
2005-09-14 17:17 ` sf
2005-09-19  0:23   ` [PATCH] git-http-fetch: Allow caching of retrieved objects byproxy servers David Lang
2005-09-19 10:24     ` sf
2005-09-19 13:35       ` Petr Baudis
2005-09-20 11:34         ` sf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=432FF3BE.8060501@b-i-t.de \
    --to=sf@b-i-t.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).