From: Jonathan Nieder <jrnieder@gmail.com>
To: git@vger.kernel.org
Cc: "Török Edwin" <edwintorok@gmail.com>,
"Shawn O. Pearce" <spearce@spearce.org>,
"Tay Ray Chuan" <rctay89@gmail.com>,
"Daniel Barkalow" <barkalow@iabervon.org>
Subject: [BUG?] remote-http: interrupted fetch leaves bad index behind
Date: Thu, 3 Feb 2011 19:09:57 -0600 [thread overview]
Message-ID: <20110204010957.GB17483@elie> (raw)
In-Reply-To: <20101105170640.30975.94952.reportbug@deb0>
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);
}
parent reply other threads:[~2011-02-04 1:10 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20101105170640.30975.94952.reportbug@deb0>]
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=20110204010957.GB17483@elie \
--to=jrnieder@gmail.com \
--cc=barkalow@iabervon.org \
--cc=edwintorok@gmail.com \
--cc=git@vger.kernel.org \
--cc=rctay89@gmail.com \
--cc=spearce@spearce.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).