git-sh-setup.sh:cd_to_toplevel problematic with symlinks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux