Code

git config: trivial rename in preparation for parseopt
[git.git] / git-sh-setup.sh
index f07d96b9b5e3997b21736893be39ce91950f4878..2142308bcc6d2e2c4962859d18e12070cd4c1b1d 100755 (executable)
@@ -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.