mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* rev-parse's show-{cdup,prefix} inconsistent when pwd symlink
@ 2019-07-07 15:36 Oliver Ford
  0 siblings, 0 replies; only message in thread
From: Oliver Ford @ 2019-07-07 15:36 UTC (permalink / raw)
  To: git

`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
$ git rev-parse --show-prefix

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
$ 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

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

only message in thread, other threads:[~2019-07-07 15:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-07 15:36 rev-parse's show-{cdup,prefix} inconsistent when pwd symlink Oliver Ford

Code repositories for project(s) associated with this public inbox

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 read-only IMAP folder(s) and NNTP newsgroup(s).