git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Handle deltified object correctly in git-*-pull family.
Date: Thu, 2 Jun 2005 10:03:29 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0506020959250.1876@ppc970.osdl.org> (raw)
In-Reply-To: <7v4qcg906f.fsf_-_@assigned-by-dhcp.cox.net>



On Thu, 2 Jun 2005, Junio C Hamano wrote:
> 
> *** Linus, this uses the new helper you wrote.  The interface is
> *** much more pleasant to use.

Can you update it for the fact that I split things up even more?

In particular, see commit 5180cacc202bb20b15981469487eb8d6b0509997: "Split 
up unpack_sha1_file() some more".

You should be able to unpack a delta with just something like this:

	int ret;
	z_stream stream;
	char hdr[100], type[10];
	unsigned long size;

	ret = unpack_sha1_header(&stream, map, mapsize, hdr, sizeof(hdr));
	if (ret < Z_OK)
		return NULL;
	if (parse_sha1_header(hdr, type, &size) < 0)
		return NULL;
	if (strcmp("delta", type))
		return NULL;
	buffer = unpack_sha1_rest(&stream, hdr, size);
	if (!buffer)
		return NULL;
	.. we now have the delta of size "size" in "buffer" ..

ie it now has proper helper functions for every single stage in unpacking
an object.

		Linus

  reply	other threads:[~2005-06-02 16:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7vy89ums2l.fsf@assigned-by-dhcp.cox.net>
2005-06-01 18:38 ` [PATCH] diff: mode bits fixes Junio C Hamano
2005-06-02 16:46   ` [PATCH] Handle deltified object correctly in git-*-pull family Junio C Hamano
2005-06-02 17:03     ` Linus Torvalds [this message]
2005-06-02 18:55       ` Junio C Hamano
2005-06-02 21:31         ` Nicolas Pitre
2005-06-02 21:36           ` Nicolas Pitre
2005-06-02 22:19             ` [PATCH 1/2] " Junio C Hamano
2005-06-02 22:48               ` Linus Torvalds
2005-06-02 22:20             ` [PATCH 2/2] Find size of SHA1 object without inflating everything Junio C Hamano
2005-06-02 18:57       ` [PATCH] " Junio C Hamano
2005-06-02 22:10         ` Linus Torvalds
2005-06-02 22:47           ` Junio C Hamano
2005-06-02 17:03     ` [PATCH] Handle deltified object correctly in git-*-pull family McMullan, Jason
2005-06-02 18:02       ` Junio C Hamano
2005-06-02 16:47   ` [PATCH] Use correct U*MAX Junio C Hamano
2005-06-03 23:02     ` Petr Baudis
2005-06-03 23:40       ` Junio C Hamano
2005-06-04  0:00         ` Petr Baudis
2005-06-04  0:09           ` Junio C Hamano
2005-06-02 16:49   ` [PATCH] Find size of SHA1 object without inflating everything Junio C Hamano
2005-05-30 20:00 I want to release a "git-1.0" Linus Torvalds
2005-05-30 20:49 ` Nicolas Pitre
2005-06-01  6:52   ` Junio C Hamano
2005-06-01  8:24     ` [PATCH] Add -d flag to git-pull-* family Junio C Hamano
2005-06-01 14:39       ` Nicolas Pitre
2005-06-01 16:00         ` Junio C Hamano
     [not found]           ` <7v1x7lk8fl.fsf_-_@assigned-by-dhcp.cox.net>
2005-06-02  0:47             ` [PATCH] Handle deltified object correctly in git-*-pull family Nicolas Pitre
2005-06-02  0:58             ` Linus Torvalds
2005-06-02  1:43               ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=Pine.LNX.4.58.0506020959250.1876@ppc970.osdl.org \
    --to=torvalds@osdl.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).