Re: [PATCH v3 10/25] Add new environment variable $GIT_COMMON_DIR
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Feb 26, 2014, 01:24 UTC
- Message-ID
- <CAPig+cRPpdfNYP=8o+9ku7Lr6bQ3EBiFQcS_aM4YBVhCbuJ3sQ@mail.gmail.com>
- In-Reply-To
- <1392730814-19656-11-git-send-email-pclouds@gmail.com>
On Tue, Feb 18, 2014 at 8:39 AM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
Show 23 quoted lines
> This variable is intended to support multiple working directories > attached to a repository. Such a repository may have a main working > directory, created by either "git init" or "git clone" and one or more > linked working directories. These working directories and the main > repository share the same repository directory. > > Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> > --- > diff --git a/Documentation/git.txt b/Documentation/git.txt > index 02bbc08..2c4a055 100644 > --- a/Documentation/git.txt > +++ b/Documentation/git.txt > @@ -773,6 +773,14 @@ Git so take care if using Cogito etc. > an explicit repository directory set via 'GIT_DIR' or on the > command line. > > +'GIT_COMMON_DIR':: > + If this variable is set to a path, non-worktree files that are > + normally in $GIT_DIR will be taken from this path > + instead. Worktree-specific files such as HEAD or index are > + taken from $GIT_DIR. This variable has lower precedence than > + other path variables such as GIT_INDEX_FILE, > + GIT_OBJECT_DIRECTORY...
For a person not familiar with "git checkout --to" or its underlying implementation, this description may be lacking. Such a reader may be left wondering about GIT_COMMON_DIR's overall purpose, and when and how it should be used. Perhaps it would make sense to talk a bit about "git checkout --to" here?
> Git Commits > ~~~~~~~~~~~ > 'GIT_AUTHOR_NAME'::