git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gummerer <t.gummerer@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Duy Nguyen <pclouds@gmail.com>,
	Jaime Soriano Pastor <jsorianopastor@gmail.com>
Subject: Re: [PATCH] read-cache: tighten checks for do_read_index
Date: Tue, 24 Mar 2015 22:51:04 +0100	[thread overview]
Message-ID: <20150324215104.GB2006@hank> (raw)
In-Reply-To: <xmqq384u5be7.fsf@gitster.dls.corp.google.com>

On 03/24, Junio C Hamano wrote:
> Thomas Gummerer <t.gummerer@gmail.com> writes:
>
> > 03f15a7 read-cache: fix reading of split index moved the checks for the
> > correct order of index entries out of do_read_index.  This loosens the
> > checks more than necessary.  Re-introduce the checks for the order, but
> > don't error out when we have multiple stage-0 entries in the index.
> > Return a flag for the caller instead, if we have multiple stage-0
> > entries and let the caller decide if we need to error out.
> >
> > Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
> > ---
> >
> > This is a patch on top of my previous patch, as that one has already
> > been merged to next.
>
> I am not convinced that this is a good change in the first place.
>
> The original before your fix was wrong exactly because it was too
> tightly tied to the implementation of the index file format where
> there was only one file whose contents must be sorted, and that is
> why it was a broken check in a new world with split-index.  And your
> fix in 'next' is the right fix---it makes the verification happen
> only on the result is given to the caller for its consumption.
>
> It may be true that entries may have to be sorted in a certain order
> when reading the original index file format and also reading some
> steps in reading the split-index, but that merely happens to be an
> imprementation detail of the two format currently supported, and as
> we improve these formats (or even introduce yet another one) in the
> longer term, this patch would re-introduce the same issue your
> earlier fix corrected, wouldn't it?

Yes, after looking at it again I completely agree.  Sorry for the noise.

  reply	other threads:[~2015-03-24 21:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-20 15:09 [PATCH] t1700: make test pass with index-v4 Thomas Gummerer
2015-03-20 17:23 ` Junio C Hamano
2015-03-20 17:37   ` Thomas Gummerer
2015-03-20 18:06     ` Junio C Hamano
2015-03-20 18:20       ` [PATCH v2] " Thomas Gummerer
2015-03-20 19:38         ` Junio C Hamano
2015-03-20 19:59           ` Thomas Gummerer
2015-03-20 21:43             ` [PATCH 0/2] fix test suite with split index Thomas Gummerer
2015-03-20 21:43               ` [PATCH 1/2] test-lib: allow using split index in the test suite Thomas Gummerer
2015-03-20 21:55                 ` Junio C Hamano
2015-03-20 22:12                   ` Thomas Gummerer
2015-03-20 21:43               ` [PATCH 2/2] read-cache: fix reading of split index Thomas Gummerer
2015-03-24 13:02                 ` Duy Nguyen
2015-03-24 17:00                   ` [PATCH] read-cache: tighten checks for do_read_index Thomas Gummerer
2015-03-24 21:33                     ` Junio C Hamano
2015-03-24 21:51                       ` Thomas Gummerer [this message]
2015-03-24 17:07                   ` [PATCH 2/2] read-cache: fix reading of split index Thomas Gummerer
2015-03-24 17:19                   ` Junio C Hamano

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=20150324215104.GB2006@hank \
    --to=t.gummerer@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jsorianopastor@gmail.com \
    --cc=pclouds@gmail.com \
    /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).