1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-09 23:00:55 +00:00
starship/tests
SeongChan Lee 611a754ec7
fix(directory): Fix path contractions for symlinked git repos (#1299)
Fixes git repo path contractions in two situations:

1. When path obtained from `PWD` is a logical path but git libraries
   return physical paths.
2. When a git repository's subdirectory is symlinked to ouside of the
   repository tree.

(1) is fixed by implementing a realpath()-like function, then reparsing
the (possibly logical) `PWD` using realpath() to convert logical
components into physical ones. The physical paths are then matched
against each other.

In the case of (2), the default behavior has been changed by simply
contracting to the home directory, exactly the same as if we are not in
a repo at all. Because determining the correct contraction is not
obvious, we bail out and just pretend we are not in a repo at all.
2020-06-17 22:44:51 -05:00
..
fixtures feat: Add the hg_branch module (#569) 2019-12-02 17:37:18 -05:00
testsuite fix(directory): Fix path contractions for symlinked git repos (#1299) 2020-06-17 22:44:51 -05:00