-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Inconsistent relative paths with symlinks in scmpuff expand #11
Comments
We deal with absolute paths internally, see I suspect the issue here actually relates to the expand command, which converts into a relative path relative to the current working directory before output, and in particular scmpuff/commands/expand/expand.go Lines 90 to 103 in c25f0e3
My assumption is
So to resolve this we'd likely have to replace it's logic with something custom. (If you want to start looking into this, as a first step, I'd recommend a failing Aruba integration scenario in |
Cool, thanks for the info. That does actually make a lot of sense. I'll give it a shot this weekend and set up a PR. |
hi @mroth, I am seeing this behavior with my symlinked golang repos, did a fix ever get committed somewhere? happy to look but don't want to replicate work |
@parkan a workaround was never added into scmpuff directly, although it's possible Golang may have fixed this upstream in |
Hmm still seeing this behavior rebuilt against golang 1.7.1, though I actually don't know enough about go dependency mgmt to know if this pulled in the latest |
@vyder Hi, did you ever get round to looking at this? |
I'm still seeing this when my repo is symlinked, eg:
Using scmpuff 0.5.0:
This shortcut can't be used, eg:
|
This also manifests when using git reset, numeric shortcuts, and files within a symlinked parent directory, eg:
|
Fixes mroth#11. [0] mroth#11 Signed-off-by: Christoph Heiss <[email protected]>
I ran in to an interesting edge case in the way scmpuff_status works - If I'm running the
gs
from a symlinked repository directory, the filenames are completely expanded out, whilegit status
shows them relative to the actual repository itself.Example:
With the following folder structure:
Difference in behavior between
gs
andgit status
:* 'git' here refers to /usr/local/bin/git, not the scmpuff git wrapper
This seems to be because of the use of
git rev-parse --show-toplevel
in process.go#105, which identifies the full path to the project root, and I guess the filenames are calculated relative to that.I'd like to attempt to patch this myself, but I haven't figured out the simplest solution yet. (I also have zero knowledge of Go). Figured I'd make this issue first to track it.
The text was updated successfully, but these errors were encountered: