rev-parse's show-{cdup,prefix} inconsistent when pwd symlink

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

 



`git rev-parse --show-prefix` gives the symlinked directory, not pwd:

```
$ git init
Initialized empty Git repository in [~]/git-test/.git/
$ mkdir realdir
$ ln -s realdir symdir
$ cd symdir
$ pwd
[~]/misc/git-test/symdir
$ git rev-parse --show-prefix
realdir/
```

That might arguably be desirable, (though not in my prompt) but I don't think this is:

```
$ cd ..
$ mkdir realdir/2
$ ln -s realdir/2 symdir2
$ cd symdir2
$ pwd
[~]/misc/git-test/symdir2
$ git rev-parse --show-cdup
../../
```

that is, `--show-cdup` gives a 'cd up' that is incorrect for where we actually are.


Apologies if I've just missed an option,

-- 
Oliver Ford



[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