Re: [PATCH v3 10/11] http-fetch: Use index-pack rather than verify-pack to check packs
- From
Tay Ray Chuan <rctay89@gmail.com>
- Date
- Apr 18, 2010, 03:07 UTC
- Message-ID
- <20100418110716.000050e5@unknown>
- In-Reply-To
- <1271534864-31944-10-git-send-email-spearce@spearce.org>
Hi,
On Sat, 17 Apr 2010 13:07:43 -0700 "Shawn O. Pearce" <spearce@spearce.org> wrote:
> diff --git a/http.c b/http.c > index 9f3dfc1..a7352b7 100644 > --- a/http.c > +++ b/http.c
[snip]
> @@ -998,11 +999,15 @@ void release_http_pack_request(struct http_pack_request *preq)
>
> int finish_http_pack_request(struct http_pack_request *preq)
> {[snip]
> + unlink(sha1_pack_index_name(p->sha1));
I think this should be done later, after we have run index-pack successfully. A good place would be probably after the if() block here:
Show 7 quoted lines
> + if (run_command(&ip)) {
> + unlink(preq->tmpfile);
> + unlink(tmp_idx);
> + free(tmp_idx);
> return -1;
> - install_packed_git(p);
> + }-- Cheers, Ray Chuan