git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Pitre <nico@cam.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>
Subject: Re: [PATCH] pack-objects: use of version 3 delta is now optional.
Date: Sun, 15 Oct 2006 11:53:35 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0610151135110.17085@xanadu.home> (raw)
In-Reply-To: <7virim10rb.fsf@assigned-by-dhcp.cox.net>

On Sun, 15 Oct 2006, Junio C Hamano wrote:

> This introduces a new configuration item, pack.deltaversion, to
> control whether pack-objects is allowed to use version 3 delta.
> By default, we keep generating version 2 delta (and version 2
> packfile format) to be compatible with git earlier than v1.2.0.
> 
> This configuration affects the command in the following ways:
> 
>  - the resulting packfile will have the specified version;
> 
>  - when generating delta, larger copies are allowed only when
>    deltaversion is 3;
> 
>  - the logic to reuse delta from existing packs refuses to reuse
>    delta from packs that uses delta version 3 when the
>    configuration is set to 2.
> 
> Signed-off-by: Junio C Hamano <junkio@cox.net>

I'd suggest to drop this altogether.  See my previous email for my 
reasoning on this issue.  I think this should be done another way.

If anything, maybe this patch can be added before v1.4.3 is released:

diff --git a/fetch-pack.c b/fetch-pack.c
index 7d23a80..1688417 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -165,9 +165,10 @@ static int find_common(int fd[2], unsign
 			continue;
 		}
 
-		packet_write(fd[1], "want %s%s%s\n", sha1_to_hex(remote),
+		packet_write(fd[1], "want %s%s%s%s\n", sha1_to_hex(remote),
 			     (multi_ack ? " multi_ack" : ""),
-			     (use_thin_pack ? " thin-pack" : ""));
+			     (use_thin_pack ? " thin-pack" : ""),
+			     " packv3");
 		fetching++;
 	}
 	packet_flush(fd[1]);
diff --git a/upload-pack.c b/upload-pack.c
index 979e583..8e57316 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -218,7 +218,7 @@ static int receive_needs(void)
 
 static int send_ref(const char *refname, const unsigned char *sha1)
 {
-	static char *capabilities = "multi_ack thin-pack";
+	static char *capabilities = "multi_ack thin-pack packv3";
 	struct object *o = parse_object(sha1);
 
 	if (!o)

This way pack v3 could be fed to GIT v1.4.3 and above whenever we add 
back pack v3 generation, and a pack converted to v2 from any v3 on the 
fly when that capability is not present.


Nicolas

  parent reply	other threads:[~2006-10-15 15:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-15  6:29 Recent and near future backward incompatibilities Junio C Hamano
2006-10-15  7:44 ` [PATCH] pack-objects: use of version 3 delta is now optional Junio C Hamano
2006-10-15  9:09   ` Jakub Narebski
2006-10-15 15:53   ` Nicolas Pitre [this message]
2006-10-15 18:10     ` Junio C Hamano
2006-10-15 18:18       ` Jakub Narebski
2006-10-15 18:51         ` Nicolas Pitre
2006-10-16  4:45           ` Junio C Hamano
2006-10-16 13:27             ` Nicolas Pitre
2006-10-15 18:30       ` Nicolas Pitre
2006-10-15 20:00         ` A Large Angry SCM
2006-10-16  2:52           ` Nicolas Pitre
2006-10-15 18:57       ` Linus Torvalds
2006-10-16 13:43         ` Nicolas Pitre
2006-10-17 16:12           ` Junio C Hamano
2006-10-17 16:51             ` Nicolas Pitre
2006-10-15 19:29       ` A Large Angry SCM
2006-10-15 14:52 ` Recent and near future backward incompatibilities Horst H. von Brand
2006-10-15 15:34 ` Nicolas Pitre
2006-10-15 18:14   ` Junio C Hamano
2006-10-15 22:40 ` Theodore Tso
2006-10-15 23:52   ` Linus Torvalds
2006-10-16  2:13     ` Stephen Hemminger

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=Pine.LNX.4.64.0610151135110.17085@xanadu.home \
    --to=nico@cam.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=torvalds@osdl.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).