Re: [PATCH 2/2] index-pack: handle duplicate base objects gracefully

2014-08-31 Thread Junio C Hamano
Jeff King writes: > Broken ident lines are annoying, but not _too_ fundamentally bad. > Duplicate tree entries are a lot worse. Fsck even distinguishes between > "error" and "warning", but "index-pack --strict" treats both as a reason > to reject the object. We could perhaps loosen that, and make

Re: [PATCH 2/2] index-pack: handle duplicate base objects gracefully

2014-08-31 Thread René Scharfe
Am 31.08.2014 um 17:17 schrieb Jeff King: On Sat, Aug 30, 2014 at 06:00:59PM +0200, René Scharfe wrote: My only nit with patch 2: Petr Stodulka and Martin von Gagern should be mentioned as bug reporters. Yeah, I agree with that. And actually, you should get a Reported-by: on the first patch

Re: [PATCH 2/2] index-pack: handle duplicate base objects gracefully

2014-08-31 Thread Jeff King
On Sat, Aug 30, 2014 at 06:10:33PM -0700, Shawn Pearce wrote: > > We do detect and complain if --strict is given. Should we make it the > > default instead? I think it is still worthwhile to have a mode that can > > handle these packs. It may be the only reasonable way to recover the > > data from

Re: [PATCH 2/2] index-pack: handle duplicate base objects gracefully

2014-08-31 Thread Jeff King
On Sat, Aug 30, 2014 at 06:00:59PM +0200, René Scharfe wrote: > My only nit with patch 2: Petr Stodulka and Martin von > Gagern should be mentioned as bug reporters. Yeah, I agree with that. And actually, you should get a Reported-by: on the first patch. :) However, I think there are some grav

Re: [PATCH 2/2] index-pack: handle duplicate base objects gracefully

2014-08-30 Thread Shawn Pearce
On Sat, Aug 30, 2014 at 6:16 AM, Jeff King wrote: > On Fri, Aug 29, 2014 at 07:59:32PM -0700, Shawn Pearce wrote: > >> > 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/g

Re: [PATCH 2/2] index-pack: handle duplicate base objects gracefully

2014-08-30 Thread René Scharfe
Am 30.08.2014 um 15:16 schrieb Jeff King: On Fri, Aug 29, 2014 at 07:59:32PM -0700, Shawn Pearce wrote: 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-contro

Re: [PATCH 2/2] index-pack: handle duplicate base objects gracefully

2014-08-30 Thread Jeff King
On Fri, Aug 29, 2014 at 07:59:32PM -0700, Shawn Pearce wrote: > > 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 > > II

Re: [PATCH 2/2] index-pack: handle duplicate base objects gracefully

2014-08-29 Thread Shawn Pearce
On Fri, Aug 29, 2014 at 3:08 PM, Jeff King wrote: > On Fri, Aug 29, 2014 at 02:56:18PM -0700, Junio C Hamano wrote: > >> Jeff King 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 delt

Re: [PATCH 2/2] index-pack: handle duplicate base objects gracefully

2014-08-29 Thread Jeff King
On Fri, Aug 29, 2014 at 02:56:18PM -0700, Junio C Hamano wrote: > Jeff King 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

Re: [PATCH 2/2] index-pack: handle duplicate base objects gracefully

2014-08-29 Thread Junio C Hamano
Jeff King 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

[PATCH 2/2] index-pack: handle duplicate base objects gracefully

2014-08-29 Thread Jeff King
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. We should instead silently ignore the delta and move