X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-sh-setup.sh;h=2142308bcc6d2e2c4962859d18e12070cd4c1b1d;hb=b452cc16d85ea9de7d3f15c83a917b5534a91120;hp=f07d96b9b5e3997b21736893be39ce91950f4878;hpb=152d70f7287c54135aa93990b462e2d34a39f500;p=git.git diff --git a/git-sh-setup.sh b/git-sh-setup.sh index f07d96b9b..2142308bc 100755 --- a/git-sh-setup.sh +++ b/git-sh-setup.sh @@ -96,7 +96,7 @@ cd_to_toplevel () { ..|../*|*/..|*/../*) # Interpret $cdup relative to the physical, not logical, cwd. # Probably /bin/pwd is more portable than passing -P to cd or pwd. - phys="$(/bin/pwd)/$cdup" + phys="$(unset PWD; /bin/pwd)/$cdup" ;; *) # There's no "..", so no need to make things absolute.