Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Nicolas Pitre <nico@cam.org>
Cc: git@vger.kernel.org
Subject: Re: PATCH/RFC] allow delta data reuse even if base object is a preferred base
Date: Wed, 27 Sep 2006 12:53:37 -0700	[thread overview]
Message-ID: <7vlko59jcu.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0609271536470.9349@xanadu.home> (Nicolas Pitre's message of "Wed, 27 Sep 2006 15:42:16 -0400 (EDT)")

Nicolas Pitre <nico@cam.org> writes:

> Signed-off-by: Nicolas Pitre <nico@cam.org>
>
> ---
>
> Any reason why this couldn't be done?
>
> When I reworked that code I preserved the existing logic wrt preferred 
> base.  However I could not find a reason why it was that way.  Hence 
> this patch.
>
> diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
> index 6db97b6..ee5f031 100644
> --- a/builtin-pack-objects.c
> +++ b/builtin-pack-objects.c
> @@ -989,7 +988,7 @@ static void check_object(struct object_e
>  		unuse_packed_git(p);
>  		entry->in_pack_header_size = used;
>  
> -		if (base_entry && !base_entry->preferred_base) {
> +		if (base_entry) {
>  
>  			/* Depth value does not matter - find_deltas()
>  			 * will never consider reused delta as the

I was wondering about it myself the other day because I do not
remember the reasoning why I thought we do not want to reuse the
delta when the base object is not part of the resulting pack.
We would recompute and create the delta ourselves anyway if we
do not take this branch, so it is not about avoiding to delta
it.

I really do not see the reason now; I think it is safe and
reasonable to remove the check.

      reply	other threads:[~2006-09-27 19:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-27 19:42 PATCH/RFC] allow delta data reuse even if base object is a preferred base Nicolas Pitre
2006-09-27 19:53 ` Junio C Hamano [this message]

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=7vlko59jcu.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=nico@cam.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