From: "Marcel M. Cary" <marcel@earth.care2.com>
To: <git@vger.kernel.org>
Subject: from symlinked directory: unable to chdir or not a git archive
Date: Tue, 14 Oct 2008 15:58:13 -0700 [thread overview]
Message-ID: <48F52405.6010406@earth.care2.com> (raw)
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
reply other threads:[~2008-10-14 23:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=48F52405.6010406@earth.care2.com \
--to=marcel@earth.care2.com \
--cc=git@vger.kernel.org \
/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).