From: David Turner <dturner@twopensource.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, pclouds@gmail.com, mhagger@alum.mit.edu,
Christian Couder <chriscool@tuxfamily.org>
Subject: Re: Re* [PATCH v2 1/2] refs: refs/worktree/* become per-worktree
Date: Tue, 11 Aug 2015 17:42:35 -0400 [thread overview]
Message-ID: <1439329355.5283.34.camel@twopensource.com> (raw)
In-Reply-To: <xmqqvbclpm3h.fsf@gitster.dls.corp.google.com>
On Tue, 2015-08-11 at 14:10 -0700, Junio C Hamano wrote:
> David Turner <dturner@twopensource.com> writes:
>
> > We need a place to stick refs for bisects in progress that is not
> > shared between worktrees. So we use the refs/worktree/ hierarchy.
>
> This is by itself OK, but to help existing Porcelains, most notably
> "gitk", I think refs/bisect/ hierarchy should be treated the same
> way. Moving them out of refs/bisect/ to refs/worktree/bisect/ would
> not be a good idea.
What does gitk do that's relevant here?
> Because refs/worktree/ hierarchy is not needed right now, I think we
> can even live with just special casing refs/bisect/ the way this
> patch does, without adding refs/worktree/ support at this point.
There are a few reasons for refs/worktree hierarchy:
1. To make it easy to see the behavior of a ref at a glance.
2. To avoid too many different special-cases.
It's true that special-casing refs/bisect would make for fewer code
changes for now, but I am worried that next week we'll discover a new
situation where we'll want per-worktree refs and then we'll have to add
more special-cases.
> > Note that git for-each-ref may have inconsistent behavior (I think; I
> > haven't confirmed this), sometimes showing refs/worktree/* and sometimes
> > not. In the long run, we should fix this, but right now, I don't know
> > that it matters, since the only refs affected are these bisect refs.
>
> We should fix that before this hits 'master', preferrably before
> this hits 'next', especially if we add support for the more generic
> refs/worktree/. If it is only for refs/bisect/, we might be OK, but
> I didn't think things through.
I will do this. Should for-each-ref include or exclude these refs? One
simple way to do "include" is to always create the refs/worktree
directory (when creating refs/).
I'll also fix the rest of the things you suggested.
next prev parent reply other threads:[~2015-08-11 21:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-11 4:56 [PATCH v2 1/2] refs: refs/worktree/* become per-worktree David Turner
2015-08-11 4:56 ` [PATCH v2 2/2] bisect: make bisection refs per-worktree David Turner
2015-08-11 21:10 ` Re* [PATCH v2 1/2] refs: refs/worktree/* become per-worktree Junio C Hamano
2015-08-11 21:42 ` David Turner [this message]
2015-08-11 22:26 ` Junio C Hamano
2015-08-11 21: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=1439329355.5283.34.camel@twopensource.com \
--to=dturner@twopensource.com \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--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).