Re: [PATCH 2/2] index-pack: handle duplicate base objects gracefully
- From
Shawn Pearce <spearce@spearce.org>
- Date
- Aug 30, 2014, 02:59 UTC
- Message-ID
- <CAJo=hJs3mM7=LcOop-WD=bipA=Wx-7MDh6ObQwFUE38tjurvcw@mail.gmail.com>
- In-Reply-To
- <20140829220818.GA24834@peff.net>
On Fri, Aug 29, 2014 at 3:08 PM, Jeff King <peff@peff.net> wrote:
Show 16 quoted lines
> On Fri, Aug 29, 2014 at 02:56:18PM -0700, Junio C Hamano wrote: > >> Jeff King <peff@peff.net> writes: >> >> > If a pack contains duplicates of an object, and if that >> > object has any deltas pointing at it with REF_DELTA, we will >> > try to resolve the deltas twice. While unusual, this is not >> > strictly an error, but we currently die() with an unhelpful >> > message. >> >> Hmm, I vaguely recall Shawn declaring this as an error in the pack >> stream, though. > > I agree it is probably a bug on the sending side, but I think last time > this came up we decided to try to be liberal in what we accept. c.f. > http://thread.gmane.org/gmane.comp.version-control.git/232305/focus=232310
IIRC they aren't valid pack files to contain duplicates.
Once upon a time JGit had a bug and android.googlesource.com returned duplicate objects in a Linux kernel repository. This caused at least some versions of git-core to fail very badly in binary search at object lookup time or something. We had a lot of users angry with us. :)
I know Nico said its OK last year, but its really not. I don't think implementations are capable of handling it.