git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: git@vger.kernel.org, Duy Nguyen <pclouds@gmail.com>
Subject: Re: [PATCH v2] Documentation/git: fix stale "MULTIPLE CHECKOUT MODE" reference
Date: Fri, 17 Jul 2015 10:03:44 -0700	[thread overview]
Message-ID: <xmqqa8uu3edr.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1437092222-11131-1-git-send-email-sunshine@sunshineco.com> (Eric Sunshine's message of "Thu, 16 Jul 2015 20:17:02 -0400")

Eric Sunshine <sunshine@sunshineco.com> writes:

> This should have been changed by 93a3649 (Documentation: move linked
> worktree description from checkout to worktree, 2015-07-06).
>
> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
> ---
>  Documentation/git.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/git.txt b/Documentation/git.txt
> index d4aa3f6..eb38027 100644
> --- a/Documentation/git.txt
> +++ b/Documentation/git.txt
> @@ -845,7 +845,7 @@ Git so take care if using Cogito etc.
>  	normally in $GIT_DIR will be taken from this path
>  	instead. Worktree-specific files such as HEAD or index are
>  	taken from $GIT_DIR. See linkgit:gitrepository-layout[5] and
> -	the section 'MULTIPLE CHECKOUT MODE' in linkgit:checkout[1]
> +	the linkgit:git-worktree[1] for
>  	details. This variable has lower precedence than other path
>  	variables such as GIT_INDEX_FILE, GIT_OBJECT_DIRECTORY...

Thanks.  I have two comments.

"if using Cogito etc.", which is totally outside the topic of this
patch, is way outdated. Perhaps we would want to remove or replace
it.

The other one is more heavy.  Do we even want to have and expose
GIT_COMMON_DIR environment variable?

The primary reason why we added GIT_DIR, GIT_OBJECT_DIRECTORY
etc. in the early days of Git was because we didn't exactly know
what kind of layout and flexibility was needed from "various SCMs
that sit on top of Git core", and we wanted to make progress rapidly
without making decisions back then.  But it is not 2005 anymore.

Suppose a file "gitdir: /home/gitster/w/src/.git/worktrees/rerere"
(call that $GIT_DIR) is there, and there is $GIT_DIR/commondir. Is
there any valid reason why somebody may want to use only part of
that arrangement and have a $GIT_COMMON_DIR that points at a place
different from $GIT_DIR/commondir points at to override only a part
of the setting?

Or perhaps there is a plain vanilla $GIT_DIR that does not have
$GIT_DIR/commondir.  Is there any valid reason why somebody may want
to reuse only part of that directory as if it were a linked checkout
and then use $GIT_COMMON_DIR to redirect the access to the meat of
the repository elsewhere?

The safety that comes from the primary checkout and the secondary
checkouts all knowing everybody else is lost in such a use case,
that is the whole point of adding this new feature.  The fact that
$GIT_COMMON_DIR/worktrees/* and $GIT_DIR/commondir reference each
other is what gives us object-prune-safety and multi-checkout-safety.

Unless I am mistaken, I think a separate GIT_COMMON_DIR environment
variable that can be tweaked by end-user is nothing but a source of
future bugs and user confusion, without giving us any useful
flexibility.

  parent reply	other threads:[~2015-07-17 17:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-17  0:17 [PATCH v2] Documentation/git: fix stale "MULTIPLE CHECKOUT MODE" reference Eric Sunshine
2015-07-17  0:19 ` Eric Sunshine
2015-07-17 17:03 ` Junio C Hamano [this message]
2015-07-17 20:52   ` Eric Sunshine
2015-07-17 21:09     ` Junio C Hamano
2015-07-18  7:57   ` Duy Nguyen
2015-07-18 20:56     ` 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

  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=xmqqa8uu3edr.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    --cc=sunshine@sunshineco.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).