git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG?] remote-http: interrupted fetch leaves bad index behind
       [not found] <20101105170640.30975.94952.reportbug@deb0>
@ 2011-02-04  1:09 ` Jonathan Nieder
  0 siblings, 0 replies; only message in thread
From: Jonathan Nieder @ 2011-02-04  1:09 UTC (permalink / raw)
  To: git; +Cc: Török Edwin, Shawn O. Pearce, Tay Ray Chuan,
	Daniel Barkalow

Hi gitsters,

Török Edwin wrote[1]:

> If I run 'git remote update' when the remote is an http URL, and then
> I Ctrl-C in the middle of a pack download, I get the .idx and .pack.temp.
> 
> Next time when I run 'git remote update' it tells me it can't find some refs:
> error: Unable to find 72128861501dc742d33e88b473482e17f6672d4c under http://git.clamav.net/clamav-devel.git
> Cannot obtain needed object 72128861501dc742d33e88b473482e17f6672d4c
> error: Fetch failed.

Steps to reproduce:

 1. Disable smart HTTP[2].
 2.
	git init reproduce
	cd reproduce
	git remote add clam http://git.clamav.net/clamav-devel.git
 3. git fetch clam
    Wait a few seconds (there will be no output).  Hit ^C.

$ ls .git/objects/pack/
pack-98c82c9d2da21d2efddc4544d68332235795df19.idx.temp.temp
$ git fetch clam
error: wrong index v2 file size in .git/objects/pack/pack-98c82c9d2da21d2efddc4544d68332235795df19.idx.temp
error: Unable to find fe96c524670f23f73008c0e6b4001c096e4f9532 under http://git.clamav.net/clamav-devel.git
Cannot obtain needed object fe96c524670f23f73008c0e6b4001c096e4f9532
error: Fetch failed.

Ideas?
Jonathan

[1] http://bugs.debian.org/602528
[2]
diff --git a/remote-curl.c b/remote-curl.c
index 04d4813..b0ad1aa 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -625,10 +625,12 @@ static int fetch_git(struct discovery *heads,
 
 static int fetch(int nr_heads, struct ref **to_fetch)
 {
+#if 0
 	struct discovery *d = discover_refs("git-upload-pack");
 	if (d->proto_git)
 		return fetch_git(d, nr_heads, to_fetch);
 	else
+#endif
 		return fetch_dumb(nr_heads, to_fetch);
 }
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-02-04  1:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20101105170640.30975.94952.reportbug@deb0>
2011-02-04  1:09 ` [BUG?] remote-http: interrupted fetch leaves bad index behind Jonathan Nieder

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).