From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH] Documentation: always respect core.worktree if set
Date: Tue, 29 Dec 2009 14:48:41 +0700 [thread overview]
Message-ID: <1262072921-11280-1-git-send-email-pclouds@gmail.com> (raw)
In-Reply-To: <7viqbrv4pa.fsf@alter.siamese.dyndns.org>
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.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
Documentation/config.txt | 23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 7d10a21..2eb9758 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -297,17 +297,24 @@ false), while all other repositories are assumed to be bare (bare
= true).
core.worktree::
- Set the path to the working tree. The value will not be
- used in combination with repositories found automatically in
- a .git directory (i.e. $GIT_DIR is not set).
+ Set the path to the root of the work tree.
This can be overridden by the GIT_WORK_TREE environment
variable and the '--work-tree' command line option. It can be
- a absolute path or relative path to the directory specified by
- --git-dir or GIT_DIR.
- Note: If --git-dir or GIT_DIR are specified but none of
+ an absolute path or a relative path to the .git directory,
+ either specified by --git-dir or GIT_DIR, or automatically
+ discovered.
+ If --git-dir or GIT_DIR are specified but none of
--work-tree, GIT_WORK_TREE and core.worktree is specified,
- the current working directory is regarded as the top directory
- of your working tree.
+ the current working directory is regarded as the root of the
+ work tree.
++
+Note that this variable 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.
core.logAllRefUpdates::
Enable the reflog. Updates to a ref <ref> is logged to the file
--
1.6.5.2.216.g9c1ec
next prev parent reply other threads:[~2009-12-29 7:49 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
2009-12-29 7:48 ` Nguyễn Thái Ngọc Duy [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1262072921-11280-1-git-send-email-pclouds@gmail.com \
--to=pclouds@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.