git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* GIT_DIR question
       [not found] <f36b08ee0706170829w59979d86i7bf09bc35ff28fca@mail.gmail.com>
@ 2007-06-17 15:34 ` Yakov Lerner
  2007-06-17 21:52   ` Matthias Lederhofer
  0 siblings, 1 reply; 4+ messages in thread
From: Yakov Lerner @ 2007-06-17 15:34 UTC (permalink / raw)
  To: git

I wanted to create cloned repo, but with metaninfo separately from data.
I cloned the repo ( git-clone ~/repo ~/x) ,
then I moved ~/x/.git to different place (mv ~/x/.git ~/git);
then exported GIT_DIR=~/git; then
cd ~/x;
But now 'git status' says 'fatal: runstatus must be run in a work tree' . Why ?

'ls $GIT_DIR'  shows
  FETCH_HEAD  HEAD  ORIG_HEAD  branches  config
  description  hooks  index  info  logs  objects  refs
This is ok, no ?

Thanks
Yakov

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

* Re: GIT_DIR question
  2007-06-17 15:34 ` GIT_DIR question Yakov Lerner
@ 2007-06-17 21:52   ` Matthias Lederhofer
  2007-06-18 19:43     ` Yakov Lerner
  0 siblings, 1 reply; 4+ messages in thread
From: Matthias Lederhofer @ 2007-06-17 21:52 UTC (permalink / raw)
  To: Yakov Lerner; +Cc: git

Yakov Lerner <iler.ml@gmail.com> wrote:
> I wanted to create cloned repo, but with metaninfo separately from data.
> I cloned the repo ( git-clone ~/repo ~/x) ,
> then I moved ~/x/.git to different place (mv ~/x/.git ~/git);
> then exported GIT_DIR=~/git; then
> cd ~/x;
> But now 'git status' says 'fatal: runstatus must be run in a work tree' . 
> Why ?
> 
> 'ls $GIT_DIR'  shows
>  FETCH_HEAD  HEAD  ORIG_HEAD  branches  config
>  description  hooks  index  info  logs  objects  refs
> This is ok, no ?

With current git you have to name the repository directory '.git' to
use it with a working tree.  Some commands work even though the
repository is named differently, others don't.

In pu is a patch series by me which changes this.  First of all the
core.bare option is used all the time, the directory name of the
repository does not matter if core.bare is specified.  Additionally
you can specify the working tree through the config option
core.worktree or the environment variable GIT_WORK_TREE.  With this
you can even work in a subdirectory of the working tree.  But this is
only in pu and it is not decided yet if this will make it into master,
even though I hope it will.  Perhaps more people asking for this helps :)

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

* Re: GIT_DIR question
  2007-06-17 21:52   ` Matthias Lederhofer
@ 2007-06-18 19:43     ` Yakov Lerner
  2007-06-19  7:15       ` Matthias Lederhofer
  0 siblings, 1 reply; 4+ messages in thread
From: Yakov Lerner @ 2007-06-18 19:43 UTC (permalink / raw)
  To: Matthias Lederhofer; +Cc: git

On 6/18/07, Matthias Lederhofer <matled@gmx.net> wrote:
> Yakov Lerner <iler.ml@gmail.com> wrote:
> > I wanted to create cloned repo, but with metaninfo separately from data.
> > I cloned the repo ( git-clone ~/repo ~/x) ,
> > then I moved ~/x/.git to different place (mv ~/x/.git ~/git);
> > then exported GIT_DIR=~/git; then
> > cd ~/x;
> > But now 'git status' says 'fatal: runstatus must be run in a work tree' .
> > Why ?
> >
> > 'ls $GIT_DIR'  shows
> >  FETCH_HEAD  HEAD  ORIG_HEAD  branches  config
> >  description  hooks  index  info  logs  objects  refs
> > This is ok, no ?
>
> With current git you have to name the repository directory '.git' to
> use it with a working tree.  Some commands work even though the
> repository is named differently, others don't.
>
> In pu is a patch series by me which changes this.  First of all the
> core.bare option is used all the time, the directory name of the
> repository does not matter if core.bare is specified.  Additionally
> you can specify the working tree through the config option
> core.worktree or the environment variable GIT_WORK_TREE.  With this
> you can even work in a subdirectory of the working tree.  But this is
> only in pu and it is not decided yet if this will make it into master,
> even though I hope it will.  Perhaps more people asking for this helps :)
>


Does your patch allow to use absolute filenames and being cwd
 outside of working dir ? I like to use absolute filenames (sometimes.
 Most modern VSCes allow absolute pathnames).

 Thanks
 Yakov

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

* Re: GIT_DIR question
  2007-06-18 19:43     ` Yakov Lerner
@ 2007-06-19  7:15       ` Matthias Lederhofer
  0 siblings, 0 replies; 4+ messages in thread
From: Matthias Lederhofer @ 2007-06-19  7:15 UTC (permalink / raw)
  To: Yakov Lerner; +Cc: git

Yakov Lerner <iler.ml@gmail.com> wrote:
> Does your patch allow to use absolute filenames and being cwd
> outside of working dir ? I like to use absolute filenames (sometimes.
> Most modern VSCes allow absolute pathnames).

Nope, that's not possible (yet).  I can't think of an easy way to do
this right now..

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

end of thread, other threads:[~2007-06-19  7:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <f36b08ee0706170829w59979d86i7bf09bc35ff28fca@mail.gmail.com>
2007-06-17 15:34 ` GIT_DIR question Yakov Lerner
2007-06-17 21:52   ` Matthias Lederhofer
2007-06-18 19:43     ` Yakov Lerner
2007-06-19  7:15       ` Matthias Lederhofer

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