From: Junio C Hamano <gitster@pobox.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Subject: Re: [PATCH] Documentation: always respect core.worktree if set
Date: Mon, 28 Dec 2009 01:16:33 -0800 [thread overview]
Message-ID: <7viqbrv4pa.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1261979704-30074-1-git-send-email-pclouds@gmail.com> ("Nguyễn Thái Ngọc Duy"'s message of "Mon\, 28 Dec 2009 12\:55\:04 +0700")
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
> In the beginning, there was GIT_DIR environment variable, with a very
> simple semantics:
> ...
(Omitted an explanation of how GIT_DIR and core.worktree work together).
> According to the current documentation, if GIT_DIR is not set,
> core.worktree is not respected, and the parent directory of the "git
> directory" may be used as worktree. This case, unless core.worktree
> matches the parent directory of the "git directory" in question, seems
> a misconfiguration and nothing else. So remove this part of the
> documentation.
>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
> Junio may find the description highly familiar :) only slightly modified
> at the end
I found it familiar, but I didn't see how that earlier part leads to the
conclusion in, or even gives a necessary background information for, the
last paragraph. Perhaps you omitted something in the middle that was more
relevant? If so, I would suggest omiting the earlier part, whose purpose
was to prepare readers for that middle part, as well.
And I don't think the claim your last paragraph makes is consistent with
what the patch does at all.
Removing the "it will be ignored" from the documentation is a good change
only in the sense that it makes the document closer to reality, but "it is
a misconfiguration" is not a good justification of the change.
A documentation-only patch that can be justitifed by "a misconfiguration"
claim would probably read like this:
The value of core.worktree in a ".git/config" is honored even when
it differs from the directory that has the ".git" directory as its
subdirectory. This is likely to be a misconfiguration, so warn
users about it. Also, drop the part of the documentation that
incorrectly claimed that we ignore such a misconfigured value.
---
core.worktree::
Set the path to the root of the work tree. Note that this
is honored even when set in a configuration file in a
".git" subdirectory of a directory, and its value differs
from the latter directory (e.g. "/path/to/.git/config" has
core.worktree set to "/different/path"), which is most
likely a misconfiguration. Running git commands in
"/path/to" directory will still use "/different/path" as
the root of the work tree and can cause great confusion to
the users.
Your earlier patch took a different approach to the misconfiguration. "It
is an error, so we silently _ignore_". It is a valid thing to say, but
the "silently" part is not friendly to the user and we would probably want
to diagnose and warn. That is what I originally meant.
next prev parent reply other threads:[~2009-12-28 9:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-07 10:15 core.worktree bug Robin Rosenberg
2009-12-15 16:30 ` Nguyen Thai Ngoc Duy
2009-12-27 13:28 ` [PATCH] Fix core.worktree being used when GIT_DIR is not set Nguyễn Thái Ngọc Duy
2009-12-27 20:58 ` Junio C Hamano
2009-12-28 0:08 ` Robin Rosenberg
2009-12-28 5:41 ` Nguyen Thai Ngoc Duy
2009-12-28 5:55 ` [PATCH] Documentation: always respect core.worktree if set Nguyễn Thái Ngọc Duy
2009-12-28 9:16 ` Junio C Hamano [this message]
2009-12-29 7:48 ` Nguyễn Thái Ngọc Duy
2009-12-29 16:58 ` Junio C Hamano
2009-12-29 17:05 ` Robin Rosenberg
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=7viqbrv4pa.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
--cc=robin.rosenberg.lists@dewire.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).