git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Lederhofer <matled@gmx.net>
To: git@vger.kernel.org
Subject: git-sh-setup.sh:cd_to_toplevel problematic with symlinks
Date: Mon, 6 Aug 2007 18:10:45 +0200	[thread overview]
Message-ID: <20070806161045.GA21815@moooo.ath.cx> (raw)

cd_to_toplevel takes the output of git rev-parse --show-cdup and feeds
it to cd.  The problem is that cd uses PWD to do what the user means
when saying cd .., i.e. it goes to /foo when in /foo/bar even though
/foo/bar might be a symlink.  Example:

    (in an existing git repository)
    /tmp/foo$ mkdir -p a/b
    /tmp/foo$ ln -s a/b c
    /tmp/foo$ cd c
    /tmp/foo/c$ git fetch . master:master
    git-fetch: line 108: /FETCH_HEAD: Permission denied

Is there any way to tell cd to ignore $PWD?

Another option is to have a new option to rev-parse which shows the
absolute path to tho toplevel.

             reply	other threads:[~2007-08-06 16:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-06 16:10 Matthias Lederhofer [this message]
     [not found] ` <20070806211238.GA27363@informatik.uni-freiburg.de>
2007-08-07 10:11   ` git-sh-setup.sh:cd_to_toplevel problematic with symlinks Matthias Lederhofer
2007-08-07 12:45     ` Uwe Kleine-König

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=20070806161045.GA21815@moooo.ath.cx \
    --to=matled@gmx.net \
    --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).