All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Michael Haggerty <mhagger@alum.mit.edu>
Cc: David Turner <dturner@twopensource.com>,
	Git Mailing List <git@vger.kernel.org>,
	Nguyen Thai Ngoc Duy <pclouds@gmail.com>,
	Christian Couder <chriscool@tuxfamily.org>
Subject: Re: [PATCH/RFC 0/2] bisect per-worktree
Date: Sun, 02 Aug 2015 11:24:02 -0700	[thread overview]
Message-ID: <xmqq1tfla6rh.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <55BC6C5C.1070707@alum.mit.edu> (Michael Haggerty's message of "Sat, 01 Aug 2015 08:51:08 +0200")

Michael Haggerty <mhagger@alum.mit.edu> writes:

> Hmm, ok, so you are thinking of a remote database with high latency. I
> was thinking more of something like LMDB, with latency comparable to
> filesystem storage.

Not necessarily.  The comment was more from conceptual point: "Why
share what needs not to be shared?"

> These worktree-specific references might be ephemeral, but they also
> imply reachability, which means that they need to be visible at least
> during object pruning.

True, but for bisect in particular, that is moot.  You are in
sightseer mode, marking various (older) points in time of an
existing history that is already anchored by branches and tags.

> Moreover, if the references don't live in the
> same database with the rest of the references, then we have to deal with
> races due to updating references in different places without atomicity.

Does that still hold true in the context of bisection?  You do not
even want atomicity to get in the way when you found this old commit
is bad and are about to mark the next one for testing by checking it
out.  You still want to mark the "bad" one (as it being bad is already
an established fact after testing), even if the subsequent checkout
of another commit (i.e. update to "HEAD") fails.

But these two comments above do take advantage of the fact that we
are discussing "bisect" and nothing else.  As a set of points to
consider in a more general context, I do agree that there are refs
and ref-like things that are per-worktree but still has to be part
of reachability, which "HEAD" is the prime example ;-), and some of
them may want to be part of a transaction.

I however think what David has been calling pseudo-refs falls more
in the "ephemeral and unnecessary to participate in reachabliity or
transaction" category (e.g. CHERRY_PICK_HEAD).  And I think the refs
used during bisection falls into the same category.

> For each worktree, we could then create a different view of the
> references by splicing parts of the full reference namespace together.
> ...
> "git prune" would see the whole namespace as it really is so that it can
> compute reachability correctly.

I really like this as a mechanism to include refs/ hierarchy, some
part of which is shared and some part of which is private.

I do not think bisect or pseudorefs needs that, though.

  reply	other threads:[~2015-08-02 18:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-31 23:56 [PATCH/RFC 0/2] bisect per-worktree David Turner
2015-07-31 23:56 ` [PATCH 1/2] refs: workree-refs/* become per-worktree David Turner
2015-07-31 23:56 ` [PATCH 2/2] bisect: make bisection refs per-worktree David Turner
2015-08-01  3:59 ` [PATCH/RFC 0/2] bisect per-worktree Michael Haggerty
2015-08-01  5:12   ` Junio C Hamano
2015-08-01  5:55     ` David Turner
2015-08-01  6:51     ` Michael Haggerty
2015-08-02 18:24       ` Junio C Hamano [this message]
2015-08-03 12:35       ` Duy Nguyen
2015-08-03 19:49       ` David Turner
2015-08-03 21:14         ` Junio C Hamano
2015-08-03 23:09         ` Duy Nguyen
2015-08-03 23:20           ` David Turner
2015-08-03 13:02   ` Duy Nguyen
2015-08-03 14:03     ` Duy Nguyen
     [not found] <CAP8UFD0aCSW3JxneHvSEE3T6zQtgipp5nhWT9VpMqHAmzd_e3Q@mail.gmail.com>
2015-08-01  5:43 ` David Turner

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=xmqq1tfla6rh.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=chriscool@tuxfamily.org \
    --cc=dturner@twopensource.com \
    --cc=git@vger.kernel.org \
    --cc=mhagger@alum.mit.edu \
    --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 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.