All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jon Seymour <jon.seymour@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC 0/9] bisect: allow git bisect to be used with repos containing damaged trees.
Date: Sun, 24 Jul 2011 11:35:32 -0700	[thread overview]
Message-ID: <7v1uxfwmq3.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1311487074-25070-1-git-send-email-jon.seymour@gmail.com> (Jon Seymour's message of "Sun, 24 Jul 2011 15:57:45 +1000")

Jon Seymour <jon.seymour@gmail.com> writes:

> ... In particular, it
> allows git bisect to be used to locate commits containing damaged trees.

I am afraid it wouldn't allow it, and I am not going to take this series
that adds an option to bisect to ignore errors during checkout.

Remember that bisection is to find a single event in the history whose
effect consistently persists in all the commits into the future from that
point.  For example, if you have this history:

    ---A---B---C

and there is a bitflip in a blob contained in the commit B's tree, you may
not be able to check it out. But that does _not_ mean you cannot check C
out due to a corrupt object in B. The change going from B to C may be to
remove that blob, for example. "A tree that refers to a corrupt object was
introduced by this commit" is not a single event whose effect cascades
through the history into the future [*1*].

Besides, if you have a corrupt commit, your history traversal may not even
be correct, as we won't be reading its parent pointers correctly.

Having said that, an option to bisect that does _not_ touch the index nor
the working tree at all may be a useful thing to have. The test you want
to run on the candidate revisions bisect suggests may not need a working
tree (e.g. it may be built around "git grep -e foo $revision -- $path"),
and it may work just as well for the bisection you wanted to do in your
broken repository.

[Footnote]

*1* Theoretically, you could turn it into such by using a test that wants
to traverse and verify all the objects reachable from the candidate
commit, e.g.

    $ git rev-list --objects $rev | git pack-objects --stdout >/dev/null

which would succeed on A, and fail on B and all the commits that reach B,
including C. Was that what you had in mind?

  parent reply	other threads:[~2011-07-24 18:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-24  5:57 [RFC 0/9] bisect: allow git bisect to be used with repos containing damaged trees Jon Seymour
2011-07-24  5:57 ` [PATCH 1/9] bisect: add tests to document expected behaviour in presence of broken trees Jon Seymour
2011-07-24  5:57 ` [PATCH 2/9] bisect: introduce a --ignore-checkout-failure option to bisect--helper Jon Seymour
2011-07-24  5:57 ` [PATCH 3/9] bisect: implement support for --ignore-checkout-failure option Jon Seymour
2011-07-24  5:57 ` [PATCH 4/9] bisect: introduce a helper function to tolerate checkout failures Jon Seymour
2011-07-24  5:57 ` [PATCH 5/9] bisect: replace existing calls to git checkout with bisect_checkout_with_ignore Jon Seymour
2011-07-24  5:57 ` [PATCH 6/9] bisect: enable --ignore-checkout-failure in the porcelain Jon Seymour
2011-07-24  5:57 ` [PATCH 7/9] bisect: better diagnostics, in case of mis-typed option Jon Seymour
2011-07-24  5:57 ` [PATCH 8/9] bisect: add tests for --ignore-checkout-failure option Jon Seymour
2011-07-24  5:57 ` [PATCH 9/9] bisect: add documentation " Jon Seymour
2011-07-24  8:05 ` [RFC 0/9] bisect: allow git bisect to be used with repos containing damaged trees Johannes Sixt
2011-07-24  8:54   ` Jon Seymour
2011-07-24 18:35 ` Junio C Hamano [this message]
2011-07-25  9:28   ` Jon Seymour
2011-07-25 18:14     ` Junio C Hamano
2011-07-25 23:27       ` Jon Seymour
2011-07-25 18:48     ` Johannes Sixt
2011-07-25 23:38       ` Jon Seymour
2011-07-26  7:43         ` Jakub Narebski
2011-07-26  8:26           ` Jon Seymour
2011-07-26 13:28           ` Jon Seymour

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=7v1uxfwmq3.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jon.seymour@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.