-
-
Notifications
You must be signed in to change notification settings - Fork 625
fix(#2467): remove newline in git paths #2478
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
4ed344a
fix(#2467): remove newline in git paths
mj2068 671f194
Merge branch 'master' into bugfix
alex-courtis a31dfad
fix: info size suffix and formatting (#2492)
Andrew15-5 c2194e9
feat(#2312): fire `TextYankPost` event on path copy (#2489)
Akmadan23 78a9ca5
feat: mapping and options to sort entries in help window (#2482)
Akmadan23 49f5103
fix(#2467): remove newline in git paths
mj2068 c8d0515
Merge branch 'bugfix' of https://github.com/mj2068/nvim-tree.lua into…
mj2068 d9e03a5
fix(#2467): change cygpath calls to array format
mj2068 fb7b4e0
stylua nit
alex-courtis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is inside the cygpath block.
I was under the impression that you are using PowerShell. Does it see cygpath?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologize for didn't fully describe my environment before.
Yes, I use PowerShell, but I also have msys2 installed on my Windows 10.
Yes, PowerShell sees "cygpath",
because the POSIX compatible environment provided msys2 is based on Cygwin. So Cygwin tools like "cygpath"(exe files you can run directly) are in the Windows path.Update:
I have to admit, in my case, the reason PowerShell sees "cygpath" is because it's inside X:/msys2/usr/bin, and this bin path is in the Windows path environment variable.
But I actually forgot whether it's added by the official msys2 installer or manually by me.
And, the situation of this issue has changed a bit due to the new commit, which made using "cygpath" a manual option with a default value: false. This bypassed the two vim.fn.system reassigning statements which were the causes of my original issue(#2467), leaving the paths conversion to these two line:
nvim-tree.lua/lua/nvim-tree/git/utils.lua
Lines 49 to 50 in db8145c
I thinking making "cygpath" a manual option is a good call, and will test it and report back.
Thx, alex. Peace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That explains a lot - a valid use case that we never expected or handled.
I'm prepared for disappointment after your testing, however we will fix this one way or another.
Big favour, if possible: please run
has.lua
for neovim inside msys2. It would be great to fill out the entirety of OS Feature FlagsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to do some reading about how msys2 works. Then I did the following inside the msys2 official shell, with nvim 0.9.4 installed from MSYS2 Packages using pacman, following their doc.
Flags: has_list_msys2_mingw.log
I then did quick git integration tests regarding the new
cygwin_support
manual option, false and true, using the latest commit.With the "Clean Room" lua file, test folder "project1" git initialized, which contains one untracked file "README.md".
After "Ready!" message, :NvimTreeOpen, select "project1", hit Enter, the results are:
cygwin_support = false(default):
shown error message:
[NvimTree] Could not start the fs_event watcher for path \tmp\project1\.git : ENOENT
log: nvim-tree_cygwin_false.log
cygwin_support = true:
no error, but no git tracking.
log: nvim-tree_cygwin_true.log
I think we need to normalize the paths.
Thx, alex.
Attachs the two screenshots, false and true respectively:

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for all your diligent testing with this unfamiliar environment. This is quite the difficult issue...
It looks like the
cygwin_support = true
case is not matching any toplevel and returning nils. It's definitely hitting theuse_cygpath
branch as thewin32
feature flag is set and we are seeing different results.To confirm:
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It did. Now, I'm not so sure, because the new "cypwin_support" option affected it.
I don't think we can merge this. But the issue is getting clearer to me. I'm working on a fix, can I have few days?