X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=git-sh-setup.sh;h=2142308bcc6d2e2c4962859d18e12070cd4c1b1d;hb=dd6c1360b22ee89cb179e2a1fface98ecbeb7b3e;hp=f07d96b9b5e3997b21736893be39ce91950f4878;hpb=08fc0608657ee91bc85276667804c36a93138c7d;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.