git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* from symlinked directory: unable to chdir or not a git archive
@ 2008-10-14 22:58 Marcel M. Cary
  0 siblings, 0 replies; only message in thread
From: Marcel M. Cary @ 2008-10-14 22:58 UTC (permalink / raw)
  To: git

I'm getting an error:

  fatal: 'origin': unable to chdir or not a git archive

when trying to pull even though pushing works just fine.  So I don't
think the problem is that the remote repository doesn't exist.  (I see
the entry in GitFaq for this error message, but I don't think that
answer quite explains this situation.)

I think it's important that, when pulling, I'm in a directory that is a
symlink into the Git working copy.  Having git operate correctly in that
environment is important to me because Git doesn't support checking out
a subdirectory of my project.

A shell transcript follows that illustrates a simplified problem
scenario using Git 1.6.0.1.  I see the same error message with 1.6.0.2
and 1.6.0.2.530.g67faa (master branch today).

Is there an easy way around this?  Right now I have to cd to the target
of the symlink to do the pull, which is annoying.

Thanks,
Marcel

~/git$ mkdir tmp-repo
~/git$ cd tmp-repo/
~/git/tmp-repo$ git init
Initialized empty Git repository in /home/marcel/git/tmp-repo/.git/
~/git/tmp-repo$ mkdir foo
~/git/tmp-repo$ touch foo/bar
~/git/tmp-repo$ git add foo/bar
~/git/tmp-repo$ git commit -m 'Add empty file'
Created initial commit 651b80a: Add empty file
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 foo/bar
~/git/tmp-repo$ cd ..
~/git$ git clone tmp-repo clone-repo
Initialized empty Git repository in /home/marcel/git/clone-repo/.git/
~/git$ ln -s clone-repo/foo/ foo-link
~/git$ cd foo-link/
~/git/foo-link$ echo hello >> bar
~/git/foo-link$ git commit -a -m 'Say hi'
Created commit 0a92c49: Say hi
 1 files changed, 1 insertions(+), 0 deletions(-)
~/git/foo-link$ git push origin master
Counting objects: 7, done.
Writing objects: 100% (4/4), 281 bytes, done.
Total 4 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (4/4), done.
To /home/marcel/git/tmp-repo/.git
   651b80a..0a92c49  master -> master
~/git/foo-link$ git pull
fatal: 'origin': unable to chdir or not a git archive
fatal: The remote end hung up unexpectedly
~/git/foo-link$ cd ~/git/clone-repo/foo
~/git/clone-repo/foo$ git pull
Already up-to-date.
~/git/clone-repo/foo$

on Linux 2.6.18-4-486, ext3

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-14 23:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-14 22:58 from symlinked directory: unable to chdir or not a git archive Marcel M. Cary

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