git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* GIT_WORK_TREE and GIT_DIR with git clone
@ 2014-01-20 15:59 Cosmin Apreutesei
  2014-01-21 20:23 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Cosmin Apreutesei @ 2014-01-20 15:59 UTC (permalink / raw)
  To: git

Hi,

I would like to have git clone respect GIT_DIR (and --git-dir) so I
can clone multiple repos into the same working directory (I know there
was another request for this[1]).

The pattern here is big projects that are modularized into multiple
git repositories, but supposed to be overlaid over a common directory
structure.

I would like to be able to tell my users that they can simply do:

git clone --git-dir=_/git/module1/.git module1-url
git clone --git-dir=_/git/module2/.git module2-url

which will overlay the files from both modules into the current
directory, which from git's perspective is the work-tree for both
modules.


[1] http://article.gmane.org/gmane.comp.version-control.git/170073/match=git_work_tree+git_dir+git+clone

^ permalink raw reply	[flat|nested] 6+ messages in thread
* GIT_WORK_TREE and GIT_DIR with git clone
@ 2011-03-26 12:58 Kacper Kornet
  2011-03-26 19:40 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Kacper Kornet @ 2011-03-26 12:58 UTC (permalink / raw)
  To: git

Is there a reason why git clone does not respect GIT_DIR
variable. I have found it confusing that:

GIT_WORK_TREE=repo GIT_DIR=repo/.git git clone <path>/repo.git

is not equivalent to

git clone <path>/repo.git

-- 
  Kacper

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-01-21 21:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-20 15:59 GIT_WORK_TREE and GIT_DIR with git clone Cosmin Apreutesei
2014-01-21 20:23 ` Junio C Hamano
2014-01-21 21:37   ` Cosmin Apreutesei
  -- strict thread matches above, loose matches on Subject: below --
2011-03-26 12:58 Kacper Kornet
2011-03-26 19:40 ` Junio C Hamano
2011-03-26 23:37   ` Kacper Kornet

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).