git.vger.kernel.org archive mirror
 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: Fri, 31 Jul 2015 22:12:51 -0700	[thread overview]
Message-ID: <CAPc5daVnfit8pkjc2HCSn0erW-q++We8gx8tPsb_ptd5H+CpJg@mail.gmail.com> (raw)
In-Reply-To: <55BC4438.8060709@alum.mit.edu>

On Fri, Jul 31, 2015 at 8:59 PM, Michael Haggerty <mhagger@alum.mit.edu> wrote:
>
> It seems to me that adding a new top-level "worktree-refs" directory is
> pretty traumatic. Lots of people and tools will have made the assumption
> that all "normal" references live under "refs/".
> ...
> It's all a bit frightening, frankly.

I actually feel the prospect of pluggable ref backend more frightening,
frankly ;-). These bisect refs are just like FETCH_HEAD and MERGE_HEAD,
not about the primary purpose of the "repository" to grow the history of refs
(branches), but about ephemeral pointers into the history used to help keep
track of what is being done in the worktree upstairs. There is no need for
these to be visible across worktrees. If we use the real refs that are grobal
in the repository (as opposed to per-worktree ones), we would hit the backend
databas with transactions to update these ephemeral things, which somehow
makes me feel stupid.

I wish we could just make refs/bisect/* (or whatever the current bisect
code uses) automatically per worktree. I know David dismissed it saying
that the current code is not set up to allow it easily, but is it
really a fundamental
limitation, or is it just a matter of coding a few more dozens of lines?

If we can keep using the same location under refs/ and transparently make
them appear per-worktree, "what is the name of the main one?", and "do we
even need to call the one and the only one 'main'?" will automatically
disappear.
Of course, "git bisect" and "gitk --bisect" does not have to change if
we go that
route.

And there will not be any backward compatibility worries. If you are not
using multiple worktrees, you will see them as refs/bisect/*, just at the
same location as you are familiar with.

  reply	other threads:[~2015-08-01  5:13 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 [this message]
2015-08-01  5:55     ` David Turner
2015-08-01  6:51     ` Michael Haggerty
2015-08-02 18:24       ` Junio C Hamano
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=CAPc5daVnfit8pkjc2HCSn0erW-q++We8gx8tPsb_ptd5H+CpJg@mail.gmail.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 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).