git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Duy Nguyen <pclouds@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: frank kulow <kulow.f@googlemail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: "git branch -f" corrupt other worktree
Date: Thu, 2 May 2019 20:49:08 +0700	[thread overview]
Message-ID: <CACsJy8CzakrDS8qW5DTbkG_SNaVQ7Y6Ps-vT91zRPKGgvUUQeA@mail.gmail.com> (raw)
In-Reply-To: <CACsJy8A67x5wtbTe9Zk6URLZOqMNUFaLuNyZSVdYkZ1Z3y=6+A@mail.gmail.com>

On Thu, May 2, 2019 at 8:05 PM Duy Nguyen <pclouds@gmail.com> wrote:
> > Part of this is "doctor, it hurts when I stab my eye" :) but I wonder in
> > general whether users are more likely to expect different worktrees to
> > have different views of the refstore, since they way they're created is
> > "I want just this branch over there".
> >
> > I.e. whether they want something closer to another directory with
> > "alternates" pointing to the "main" repo, and whether that should be
> > promoted to UI that's easier to set up than it is now.
> >
> > Or maybe something in-between, where they'd expect remote tracking refs
> > to update for everything, but a worktree's "master" branch not to be
> > touchable by a worktree on "topic".
>
> I think it's a minefield to go with different views on refs. They can
> already have per-worktree refs now. Granted it's long to type (e.g.
> worktrees/foo/something) but it does help remind it's per-worktree.

Correction (apparently I'm not using per-worktree refs enough to remember).

s,worktrees/foo/something,worktree/something,

worktrees/<name>/<ref> is to access per-worktree refs of other
worktrees. worktree/<ref> is about the current one.

> And we can probably improve the ref resolution rules to resolve
> "foo/something" (or "something" even) to worktrees/foo/something for
> example. But going totally custom, I think it's hard to even manage as
> a user.
>
> With that said, I think we can technically support per-worktree refs
> even outside worktrees/, or the whole refeference space per-worktree,
> now. The difficulty will be coming up with some sane UI that can
> handle that and not leave too many traps behind. I can't see that UI.
> --
> Duy



-- 
Duy

  reply	other threads:[~2019-05-02 13:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-02 11:58 "git branch -f" corrupt other worktree frank kulow
2019-05-02 12:29 ` Duy Nguyen
2019-05-02 12:51   ` Ævar Arnfjörð Bjarmason
2019-05-02 13:05     ` Duy Nguyen
2019-05-02 13:49       ` Duy Nguyen [this message]
2019-05-02 17:16       ` Duy Nguyen

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACsJy8CzakrDS8qW5DTbkG_SNaVQ7Y6Ps-vT91zRPKGgvUUQeA@mail.gmail.com \
    --to=pclouds@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kulow.f@googlemail.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).