public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Jeff King <peff@peff•net>
Cc: git@vger•kernel.org
Subject: Re: [PATCH 1/2] sha1_object_info_extended: provide delta base sha1s
Date: Thu, 26 Dec 2013 11:54:21 -0800	[thread overview]
Message-ID: <xmqqa9fncrrm.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20131221142419.GA29679@sigill.intra.peff.net> (Jeff King's message of "Sat, 21 Dec 2013 09:24:20 -0500")

Jeff King <peff@peff•net> writes:

> @@ -1824,6 +1856,22 @@ static int packed_object_info(struct packed_git *p, off_t obj_offset,
>  		}
>  	}
>  
> +	if (oi->delta_base_sha1) {
> +		if (type == OBJ_OFS_DELTA || type == OBJ_REF_DELTA) {
> +			const unsigned char *base;
> +
> +			base = get_delta_base_sha1(p, &w_curs, curpos,
> +						   type, obj_offset);
> +			if (!base) {
> +				type = OBJ_BAD;
> +				goto out;
> +			}
> +
> +			hashcpy(oi->delta_base_sha1, base);
> +		} else
> +			hashclr(oi->delta_base_sha1);
> +	}
> +

Makes sense.

  reply	other threads:[~2013-12-26 19:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-21 14:23 [PATCH 0/2] cat-file --batch-check='%(deltabase)' Jeff King
2013-12-21 14:24 ` [PATCH 1/2] sha1_object_info_extended: provide delta base sha1s Jeff King
2013-12-26 19:54   ` Junio C Hamano [this message]
2013-12-21 14:25 ` [PATCH 2/2] cat-file: provide %(deltabase) batch format Jeff King
2013-12-26 20:20 ` [PATCH 0/2] cat-file --batch-check='%(deltabase)' Jonathan Nieder

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=xmqqa9fncrrm.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=peff@peff$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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