Nguyễn Thái Ngọc Duy  <pclo...@gmail.com> writes:

> Subject: Re: [PATCH v3 2/8] Add a place for (not) sharing stuff between 
> worktrees

"a place"?  Missing "in $GIR_DIR" in the descrition made me read the
above three times before getting what it wanted to say.

My attempt to improve it, which admittedly is not great, came up with:

worktree: convention to make per-worktree things identifiable in $GIT_DIR

> When multiple worktrees are used, we need rules to determine if
> something belongs to one worktree or all of them. Instead of keeping
> adding rules when new stuff comes (*), have a generic rule:
>
> - Inside $GIT_DIR, which is per-worktree by default, add
>   $GIT_DIR/common which is always shared. New features that want to
>   share stuff should put stuff under this directory.
>
> - Inside refs/, which is shared by default except refs/bisect, add
>   refs/worktree/ which is per-worktree. We may eventually move
>   refs/bisect to this new location and remove the exception in refs
>   code.
>
> (*) And it may also include stuff from external commands which will
>     have no way to modify common/per-worktree rules.

OK.  Establishing such a convention is a good role for the core-git
should play to help third-party tools.

Should this play well with the per-worktree configuration as well?
Is it better to carve out a configuration variable namespace so that
certain keys are never read from common ones (or per-worktree ones),
so that people can tell which ones are what?  I know your current
design says "this is just another new layer, and the users can hang
themselves with this new rope".  I am wondering if there is a need
to do something a bit more structured.


Reply via email to