git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Lederhofer <matled@gmx.net>
To: Git Mailing List <git@vger.kernel.org>,
	Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Subject: [RFC] GIT_WORK_TREE
Date: Sun, 3 Jun 2007 16:44:01 +0200	[thread overview]
Message-ID: <20070603144401.GA9518@moooo.ath.cx> (raw)

Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
> I think it's a valid use case. Anyone remember why Matthias' patchset
> was dropped?
> It was last mentioned in
> http://article.gmane.org/gmane.comp.version-control.git/43041
> 
> Junio, Matthias? May I help?

Thanks for reminding me, I just did not finish the patch and then
there was an exam which took all my time.  But I took another look at
it and made a new series, including the missing test cases.
If you want to help please test it, check the source for errors, make
comments etc.

This series introduces the GIT_WORK_TREE environment variable (and
core.worktree config option) to specify the working tree that should
be used with the repository (not for repositories found as .git
directory).  This allows to separate the repository and working tree.

Example use cases:
- you don't want to put the repository in the checkout (e.g. the
  checkout is publicly available but the history shouldn't)
- you want to track a read-only directory with git (e.g. track
  configuration files as normal user that are modified by other people
  or by yourself as superuser)
- there is a directory many people are working in and you can track
  the changes made by yourself and others without placing the .git
  directory in the directory
- checkout multiple repositories into the same directory
- see the mail form nguyen (Message-ID:
  <fcaeb9bf0705300742u22b54c78vccbc037fb553141f@mail.gmail.com>)

The patches are also available from git://igit.ath.cx/~matled/git in
branch worktree (I might change this branch later) or as tag
worktree1.

[PATCH] rev-parse: document --is-inside-git-dir
[PATCH] rev-parse: introduce --is-bare-repository
[PATCH] test git rev-parse
[PATCH] introduce GIT_WORK_TREE to specify the work tree
[PATCH] use new semantics of is_bare/inside_git_dir/inside_work_tree
[PATCH] extend rev-parse test for --is-inside-work-tree
[PATCH] test GIT_WORK_TREE

There are also a few things which are not addressed in this series:
- The documentation needs updates on what bare means.
- is_bare_repository should ignore trailing slashes when guessing if
  the repository is bare (/path/to/.git is not bare, /path/to/.git/ is
  bare if core.bare is unspecified).  Perhaps we can also set GIT_DIR
  to the path returned by getcwd which would solve this too.
- Aliases using --git-dir and/or --work-tree cause problems (also
  before this patch).  git should probably exec itself if an alias
  uses --git-dir or --work-tree.
- Calls to git_config(git_default_config) can be removed in many
  places because setup_git_directory_gently always reads the
  configuration.
- git init could set core.worktree if GIT_WORK_TREE is set.

             reply	other threads:[~2007-06-03 14:45 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-03 14:44 Matthias Lederhofer [this message]
2007-06-03 14:46 ` [PATCH 1/7] rev-parse: document --is-inside-git-dir Matthias Lederhofer
2007-06-03 14:46 ` [PATCH 2/7] rev-parse: introduce --is-bare-repository Matthias Lederhofer
2007-06-03 14:47 ` [PATCH 3/7] test git rev-parse Matthias Lederhofer
2007-06-06  7:01   ` [PATCH 3/7 (amend)] " Matthias Lederhofer
2007-06-03 14:47 ` [PATCH 4/7] introduce GIT_WORK_TREE to specify the work tree Matthias Lederhofer
2007-06-05  7:52   ` Junio C Hamano
2007-06-05 16:49     ` [PATCH] filter-branch: always export GIT_DIR if it is set Matthias Lederhofer
2007-06-05 17:27       ` Johannes Schindelin
2007-06-05 20:39         ` Junio C Hamano
2007-06-06  7:16       ` [PATCH (amend)] " Matthias Lederhofer
2007-06-06  7:10   ` [PATCH 4/7 (amend)] introduce GIT_WORK_TREE to specify the work tree Matthias Lederhofer
2007-06-03 14:48 ` [RFC] GIT_WORK_TREE Matthias Lederhofer
2007-06-03 14:51   ` Matthias Lederhofer
2007-06-03 14:48 ` [PATCH 6/7] extend rev-parse test for --is-inside-work-tree Matthias Lederhofer
2007-06-06  7:13   ` [PATCH 6/7 (amend)] " Matthias Lederhofer
2007-06-03 14:49 ` [PATCH 7/7] test GIT_WORK_TREE Matthias Lederhofer
2007-06-06  7:14   ` [PATCH 7/7 (amend)] " Matthias Lederhofer
2007-06-03 16:02 ` [RFC] GIT_WORK_TREE Sergio
2007-06-03 19:32   ` Matthias Lederhofer
2007-06-03 21:34     ` Sergio
2007-06-06 21:29 ` [PATCH] setup_git_directory: fix segfault if repository is found in cwd Matthias Lederhofer

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=20070603144401.GA9518@moooo.ath.cx \
    --to=matled@gmx.net \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.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 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 NNTP newsgroup(s).