git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] worktree: add per-worktree config files
Date: Wed, 26 Sep 2018 10:40:01 -0700	[thread overview]
Message-ID: <xmqq4lecma32.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CACsJy8Bux0iiOp+zjELM4DuZwiQMA6EDaL0M71Jkp_qPACD8og@mail.gmail.com> (Duy Nguyen's message of "Wed, 26 Sep 2018 17:48:48 +0200")

Duy Nguyen <pclouds@gmail.com> writes:

> I believe the main selling point of multiple worktrees is sharing
> refs. You could easily avoid expensive clones with --local, but
> synchronizing between different clones is not very convenient. Other
> than that, different worktrees tend to behave like separate clones.

OK.  Even with the enforced limitation that no single branch can be
checked out in multiple worktrees at the same time, it is more
convenient as you can "merge" other branch and trust that the result
on the checked-out branch in your worktree is immediately visible to
other worktrees.

> user has multiple worktrees, but the extension is not enabled. I'm

Exactly.  "config --worktree" in your script will silently break
other worktrees; it wanted to affect only the current worktree, but
it changed settings to all the others.

> probably not clear in the commit message, but "git config" can detect
> that the extension has not been enabled, automatically enable it (and
> move core.bare and core.worktree (if present) to the main worktree's
> private config), so "git config --worktree" will never share the
> change.

I wonder if that is good enough.  The user in one worktree did
"config --worktree" and all the worktrees now start diverging in
their config---but that is true _only_ when they use "--worktree"
option to say "I want this to be set differently from others".  All
the other calls to "git config" will stil be shared.

So from a cursory thinking, it sounds OK to me, but somebody else
may think of bad ramifications after a good night sleep.




  reply	other threads:[~2018-09-26 17:40 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-23 17:04 [PATCH] worktree: add per-worktree config files Nguyễn Thái Ngọc Duy
2018-09-23 20:47 ` Eric Sunshine
2018-09-24 14:21 ` Taylor Blau
2018-09-25 15:57   ` Duy Nguyen
2018-09-29 13:53   ` Duy Nguyen
2018-09-25 21:26 ` Junio C Hamano
2018-09-26 15:48   ` Duy Nguyen
2018-09-26 17:40     ` Junio C Hamano [this message]
2018-09-27 15:24     ` Wherefor worktrees? Marc Branchaud
2018-09-27 16:36       ` Duy Nguyen
2018-09-26 18:25 ` [PATCH] worktree: add per-worktree config files Ævar Arnfjörð Bjarmason
2018-09-27 17:24   ` Duy Nguyen
2018-09-27 18:34     ` Ævar Arnfjörð Bjarmason
2018-09-27 18:49       ` Duy Nguyen
2018-09-29  6:36       ` Duy Nguyen
2018-09-29 15:30 ` [PATCH v2 0/2] Per-worktree " Nguyễn Thái Ngọc Duy
2018-09-29 15:30   ` [PATCH v2 1/2] t1300: extract and use test_cmp_config() Nguyễn Thái Ngọc Duy
2018-09-30  4:05     ` Eric Sunshine
2018-09-30 12:31     ` SZEDER Gábor
2018-09-29 15:30   ` [PATCH v2 2/2] worktree: add per-worktree config files Nguyễn Thái Ngọc Duy
2018-09-30  4:32     ` Eric Sunshine
2018-09-30  7:15       ` Duy Nguyen
2018-09-30  7:24         ` Eric Sunshine
2018-09-30  7:36           ` Duy Nguyen
2018-10-02 16:06   ` [PATCH v3 0/2] Per-worktree " Nguyễn Thái Ngọc Duy
2018-10-02 16:06     ` [PATCH v3 1/2] t1300: extract and use test_cmp_config() Nguyễn Thái Ngọc Duy
2018-10-03  7:46       ` Eric Sunshine
2018-10-02 16:06     ` [PATCH v3 2/2] worktree: add per-worktree config files Nguyễn Thái Ngọc Duy
2018-10-21 14:02     ` [PATCH v4 0/2] Per-worktree " Nguyễn Thái Ngọc Duy
2018-10-21 14:02       ` [PATCH v4 1/2] t1300: extract and use test_cmp_config() Nguyễn Thái Ngọc Duy
2018-10-21 14:02       ` [PATCH v4 2/2] worktree: add per-worktree config files Nguyễn Thái Ngọc Duy
2018-10-22  4:54         ` Junio C Hamano
2018-10-22 14:32           ` Duy Nguyen
2018-10-25  9:16             ` Junio C Hamano

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=xmqq4lecma32.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --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).