-
-
Notifications
You must be signed in to change notification settings - Fork 624
fix(#1976): improve $GIT_DIR
handling
#2012
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
fix(#1976): improve $GIT_DIR
handling
#2012
Conversation
- Retrieve $GIT_DIR using `git rev-parse --absolute-git-dir` - Move $GIT_DIR ignore in the project exploration part Resolves nvim-tree#1976
Using a clean room environment with watcher and git logs enabled. Testing with a default setupmkdir default masteropen tree
touch .git/config
branchopen tree
.git is now shown
|
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.
Looking good so far.
Initial testing shows things are mostly working for a default .git
directory and a user specified one.
Please:
- test cygwin / WSL
- use a norm_path from utils.lua
- deal with fix(#1976): improve
$GIT_DIR
handling #2012 (comment)
Thanks for your feedback @alex-courtis. I hope I will have time today or tomorrow to improve the PR. |
- move norm_path to utils.lua - fix comment nvim-tree#2012
I think I've fixed #2012 comment. However, I was not able to test on cygwin and WSL, to be honest, I just reused code already written. |
Ah, damn. I assumed you were using windows. Do you have a windows environment you can test with? The code looks the same, however I am nervous... |
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 appears to work for default and different git dirs. I'll fully test once we sort out the watcher ignores.
Please:
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.
Please:
- @dmehala Tidy watch.lua fix(#1976): improve
$GIT_DIR
handling #2012 (comment) - @dmehala Remove unnecessary git call https://github.com/nvim-tree/nvim-tree.lua/pull/2012/files#r1125590684
- @alex-courtis Document assumptions
Any updates on this one @dmehala ? |
Hey @alex-courtis, Sorry for the late reply, I think I've manage to follow your requirements in 5a83629. May you have a look? :) |
Experimental async git status handling has been added #2104 Please do test this. I am dogfooding this branch, with async enabled for ~week. |
I have been using it for a while, didn't notice any issues. EDIT: meant #2104 - async git, to be clear. |
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.
Many thanks for your contribution @dmehala !
* Improve $GIT_DIR handling - Retrieve $GIT_DIR using `git rev-parse --absolute-git-dir` - Move $GIT_DIR ignore in the project exploration part Resolves nvim-tree#1976 * Code review - move norm_path to utils.lua - fix comment nvim-tree#2012 * add comments for utils.norm_path * get_git_directory use norm_path from utils * watcher improvements --------- Co-authored-by: Alexander Courtis <alex@courtis.org>
This reverts commit 517dee6.
* Improve $GIT_DIR handling - Retrieve $GIT_DIR using `git rev-parse --absolute-git-dir` - Move $GIT_DIR ignore in the project exploration part Resolves nvim-tree#1976 * Code review - move norm_path to utils.lua - fix comment nvim-tree#2012 * add comments for utils.norm_path * get_git_directory use norm_path from utils * watcher improvements --------- Co-authored-by: Alexander Courtis <alex@courtis.org>
git rev-parse --absolute-git-dir
Resolves #1976