{"thread":{"id":"8627","subject":"GIT_DIR question","startedAt":"2007-06-17T15:34:14Z","lastAt":"2007-06-19T07:15:55Z","messageCount":4,"participants":["Yakov Lerner","Matthias Lederhofer"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"45224","messageId":"f36b08ee0706170834m464ce57dl3fd5b549b23abb16@mail.gmail.com","threadId":"8627","inReplyTo":"f36b08ee0706170829w59979d86i7bf09bc35ff28fca@mail.gmail.com","subject":"GIT_DIR question","fromName":"Yakov Lerner","fromEmail":"iler.ml@gmail.com","sentAt":"2007-06-17T15:34:14Z","receivedAt":"2007-06-17T15:34:14Z","isPatch":false,"sender":{"key":"iler.ml@gmail.com","avatar":null},"body":"I wanted to create cloned repo, but with metaninfo separately from data.\nI cloned the repo ( git-clone ~/repo ~/x) ,\nthen I moved ~/x/.git to different place (mv ~/x/.git ~/git);\nthen exported GIT_DIR=~/git; then\ncd ~/x;\nBut now 'git status' says 'fatal: runstatus must be run in a work tree' . Why ?\n\n'ls $GIT_DIR'  shows\n  FETCH_HEAD  HEAD  ORIG_HEAD  branches  config\n  description  hooks  index  info  logs  objects  refs\nThis is ok, no ?\n\nThanks\nYakov\n"},{"id":"45247","messageId":"20070617215235.GA27753@moooo.ath.cx","threadId":"8627","inReplyTo":"f36b08ee0706170834m464ce57dl3fd5b549b23abb16@mail.gmail.com","subject":"Re: GIT_DIR question","fromName":"Matthias Lederhofer","fromEmail":"matled@gmx.net","sentAt":"2007-06-17T21:52:35Z","receivedAt":"2007-06-17T21:52:35Z","isPatch":false,"sender":{"key":"matled@gmx.net","avatar":null},"body":"Yakov Lerner <iler.ml@gmail.com> wrote:\n> I wanted to create cloned repo, but with metaninfo separately from data.\n> I cloned the repo ( git-clone ~/repo ~/x) ,\n> then I moved ~/x/.git to different place (mv ~/x/.git ~/git);\n> then exported GIT_DIR=~/git; then\n> cd ~/x;\n> But now 'git status' says 'fatal: runstatus must be run in a work tree' . \n> Why ?\n> \n> 'ls $GIT_DIR'  shows\n>  FETCH_HEAD  HEAD  ORIG_HEAD  branches  config\n>  description  hooks  index  info  logs  objects  refs\n> This is ok, no ?\n\nWith current git you have to name the repository directory '.git' to\nuse it with a working tree.  Some commands work even though the\nrepository is named differently, others don't.\n\nIn pu is a patch series by me which changes this.  First of all the\ncore.bare option is used all the time, the directory name of the\nrepository does not matter if core.bare is specified.  Additionally\nyou can specify the working tree through the config option\ncore.worktree or the environment variable GIT_WORK_TREE.  With this\nyou can even work in a subdirectory of the working tree.  But this is\nonly in pu and it is not decided yet if this will make it into master,\neven though I hope it will.  Perhaps more people asking for this helps :)\n"},{"id":"45276","messageId":"f36b08ee0706181243x64241585rfb64ca48323dea1e@mail.gmail.com","threadId":"8627","inReplyTo":"20070617215235.GA27753@moooo.ath.cx","subject":"Re: GIT_DIR question","fromName":"Yakov Lerner","fromEmail":"iler.ml@gmail.com","sentAt":"2007-06-18T19:43:57Z","receivedAt":"2007-06-18T19:43:57Z","isPatch":false,"sender":{"key":"iler.ml@gmail.com","avatar":null},"body":"On 6/18/07, Matthias Lederhofer <matled@gmx.net> wrote:\n> Yakov Lerner <iler.ml@gmail.com> wrote:\n> > I wanted to create cloned repo, but with metaninfo separately from data.\n> > I cloned the repo ( git-clone ~/repo ~/x) ,\n> > then I moved ~/x/.git to different place (mv ~/x/.git ~/git);\n> > then exported GIT_DIR=~/git; then\n> > cd ~/x;\n> > But now 'git status' says 'fatal: runstatus must be run in a work tree' .\n> > Why ?\n> >\n> > 'ls $GIT_DIR'  shows\n> >  FETCH_HEAD  HEAD  ORIG_HEAD  branches  config\n> >  description  hooks  index  info  logs  objects  refs\n> > This is ok, no ?\n>\n> With current git you have to name the repository directory '.git' to\n> use it with a working tree.  Some commands work even though the\n> repository is named differently, others don't.\n>\n> In pu is a patch series by me which changes this.  First of all the\n> core.bare option is used all the time, the directory name of the\n> repository does not matter if core.bare is specified.  Additionally\n> you can specify the working tree through the config option\n> core.worktree or the environment variable GIT_WORK_TREE.  With this\n> you can even work in a subdirectory of the working tree.  But this is\n> only in pu and it is not decided yet if this will make it into master,\n> even though I hope it will.  Perhaps more people asking for this helps :)\n>\n\n\nDoes your patch allow to use absolute filenames and being cwd\n outside of working dir ? I like to use absolute filenames (sometimes.\n Most modern VSCes allow absolute pathnames).\n\n Thanks\n Yakov\n"},{"id":"45322","messageId":"20070619071555.GA25338@moooo.ath.cx","threadId":"8627","inReplyTo":"f36b08ee0706181243x64241585rfb64ca48323dea1e@mail.gmail.com","subject":"Re: GIT_DIR question","fromName":"Matthias Lederhofer","fromEmail":"matled@gmx.net","sentAt":"2007-06-19T07:15:55Z","receivedAt":"2007-06-19T07:15:55Z","isPatch":false,"sender":{"key":"matled@gmx.net","avatar":null},"body":"Yakov Lerner <iler.ml@gmail.com> wrote:\n> Does your patch allow to use absolute filenames and being cwd\n> outside of working dir ? I like to use absolute filenames (sometimes.\n> Most modern VSCes allow absolute pathnames).\n\nNope, that's not possible (yet).  I can't think of an easy way to do\nthis right now..\n"}]}