-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support more path types in vcs_relative_path
#304
Support more path types in vcs_relative_path
#304
Conversation
Proof it works on macOS:
and on Ubuntu:
|
Looks great! Could you please add a comment that cites the StackOverflow page? Other than that, its ready to merge. |
c4a60a7
to
4a9493f
Compare
All done. While I'm here, and on a similar topic to #302, is this likely to make it into a new version? |
Thanks! |
Hi @jamesottaway ! Sadly I had to revert 87b7cd0. "make test" fails. Can you take a look. A file at the base of the repo adds "/" to .gitignore instead of "/filename".
|
Fixes #303
I see now that the old
local p=$( printf "%s" "$( pwd -P )/${1}" | sed 's#//*#/#g' )
line was trying to generate an absolute path, but it didn't support../
and also assumed it was being given a relative path and hence failed when passed an absolute one.I got the implementation of
abs
from StackOverflow and ran ShellCheck over it to fix a few small things, which avoids both caveats of the old line.By moving this out of
vcs_relative_path
any improvements/fixes needed can be scoped to the newabs
function, andvcs_relative_path
is now much easier to follow.