Skip to content
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

Need to set --work-tree? #16

Closed
pinkchry opened this issue Aug 15, 2010 · 4 comments
Closed

Need to set --work-tree? #16

pinkchry opened this issue Aug 15, 2010 · 4 comments

Comments

@pinkchry
Copy link

I'm having some issues with running fugitive.vim under windows with msysgit. Running Gstatus tells me that all the files in the repo are marked as deleted. After researching the issue, it looks like --work-tree may need to get set as well. I'm surprised that no one has run into this before...

@pinkchry
Copy link
Author

After more investigation it looks like something funky is going on. --work-tree does not seem necessary.
However git still thinks that all the files in the repo have been deleted and the files in the dir all are marked as untracked. They are the same files! Somehow git cannot match the current files in the directory with the repo. Running this command in a separate dos prompt works fine

c:\windows\system32\cmd /c git --git-dir="F:/src/.git" --work-tree="F:/src/" status

Also :Git status works unlike :Gstatus

@pinkchry
Copy link
Author

After going through the code I guess changing

let index = expand('%')
to
let index = expand('%:p')

appears to solve the problem. Hope this helps someone out.

@tpope
Copy link
Owner

tpope commented Aug 19, 2010

Are you doing something sketchy like automatically changing the directory each time you edit the file? That's a common cause of hard to debug issues like this.

Your fix, though, is fairly low impact, so I'm applying it.

@pinkchry
Copy link
Author

Nothing that I know of unless other plugins are doing something weird. current directory seemed to be ok. It's just that the index file was found in the parent dir and not the .git directory

doronbehar pushed a commit to doronbehar/nvim-fugitive that referenced this issue May 14, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants