git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: git@vger.kernel.org
Cc: Linus Torvalds <torvalds@osdl.org>,
	Stephen Hemminger <shemminger@osdl.org>
Subject: Recent and near future backward incompatibilities
Date: Sat, 14 Oct 2006 23:29:17 -0700	[thread overview]
Message-ID: <7v4pu62ite.fsf@assigned-by-dhcp.cox.net> (raw)

It was brought to my attention that the public git.git
repository cannot be cloned with older versions of git.  More
precisely, packs generated with post 16854571 (NOT contained in
v1.4.2.3 but in the current "master" and more importantly in
v1.4.3-rc3 which I tagged tonight) can contain deltas that are
not compatible with the version of git before d60fc1c8, which
means that v1.1.6 and older (v1.2.0 and later are Ok).

The older version of git did not know anything about version 3
delta (which can express larger copies from source when
computing a delta) before d60fc1c8, and barfs if it is fed a
pack that contains such a delta.  We have generated only version
2 delta for quite a while until very recently post v1.4.2.3.

The thing is, I made a mistake to repack my public repository
with more recent git (I work with "next" usually, and with
"master" after we go into -rcX cycle to prepare for the
release).  Although the version of git that kernel.org runs is
still v1.4.2.3 which means its pack-objects does not produce
version 3 delta by itself, the problem is that the delta reuse
logic happily copies out whatever delta is in existing packs.

I already repacked the public repository with an older git,
v1.4.2.3, using 'git-repack -a -d -f' to fix this problem.

One thing we can and should immediately do is to revert 16854571
for now until we decide how to resolve this issue cleanly.

These are what needs to happen but one of them is quite tricky:

 - the reusing of delta is what makes pack-objects practical,
   and it is expensive to look into existing delta to see if it
   is version 2 or version 3 before deciding to reuse each delta
   data, so even if we update pack-objects so that we can tell
   it to generate a pack that contains only version 2 deltas, it
   would be very expensive to do so and may not be practical.  I
   am not sure how to resolve this issue efficiently right now;
   we need a bit of thinking.

 - so instead we could just say a public repository that needs
   to interoperate with older clients should not keep packs with
   version 3 delta, at least for now.  deltifying from loose
   objects are done afresh every time pack-objects is run, and
   it is easier to control.

 - git-pack-objects needs to be updated so that we can control
   whether we generate version 2 or version 3 delta.

 - we need to add .git/config item that tells pack-objects to
   never generate version 3 delta for that particular
   repository.  This is similar to the way we would need to
   control the use of delta-base-offset representation currently
   cooking in "next".

 - the on-the-wire protocol between fetch-pack and upload-pack
   needs to be updated so that the server side can tell if the
   client side is prepared to handle version 3 delta in the
   pack, and this needs to be passed to pack-objects to control
   its operation.  This part I can see how to fix.

We may have a similar issue when enabling generation of loose
objects with new style headers.  This is already controlled with
the core.legacyheaders configuration item.

             reply	other threads:[~2006-10-15  6:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-15  6:29 Junio C Hamano [this message]
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
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

  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=7v4pu62ite.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=shemminger@osdl.org \
    --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.
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).