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

:Gwrite crashes, fails to write buffer, and adds all changes in working directory #696

Closed
tobanw opened this issue Oct 6, 2015 · 15 comments

Comments

@tobanw
Copy link

tobanw commented Oct 6, 2015

I just updated my vim plugins after probably a few months and now I'm getting this error when trying to write and add with :Gw

"~/.../working-dir/"
Error detected while processing function <SNR>23_Write:
line    77:
E502: "~/.../working-dir/" is a directory

The buffer doesn't even get written, and all changes in the pwd get added (even untracked files).

@tpope
Copy link
Owner

tpope commented Oct 6, 2015

What is :echo fugitive#buffer().path()?

@tobanw
Copy link
Author

tobanw commented Oct 6, 2015

It's blank on the two trouble files I tested with, but now I'm trying other files and it shows the filename.

I'm wondering if there's a conflict with ranger (a terminal-based filemanager), because the bug shows up when I launch vim from ranger, but not when I launch vim from the command line.

@tpope
Copy link
Owner

tpope commented Oct 6, 2015

Could also be related to symlink tomfoolery,

On Oct 6, 2015, at 13:27, Toban Wiebe notifications@github.com wrote:

It's blank on the two trouble files I tested with, but now I'm trying other files and it shows the filename.

I'm wondering if there's a conflict with ranger (a terminal-based filemanager), because the bug shows up when I launch vim from ranger, but not when I launch vim from the command line.


Reply to this email directly or view it on GitHub.

@tobanw
Copy link
Author

tobanw commented Oct 6, 2015

Yes, perhaps -- all my files are in one main (soft) symlinked directory.

@tobanw tobanw closed this as completed Oct 6, 2015
@tobanw tobanw reopened this Oct 6, 2015
tpope added a commit that referenced this issue Oct 7, 2015
@tpope
Copy link
Owner

tpope commented Oct 7, 2015

Ok, it's on you to figure out what's going on. I pushed up a proper error message for when it happens.

@n10v
Copy link

n10v commented Oct 19, 2015

Same issue

@tpope
Copy link
Owner

tpope commented Oct 19, 2015

Same response

@n10v
Copy link

n10v commented Oct 19, 2015

I haven't got any symlinks in project
In :echo fugitive#buffer().path() there is a path of my file

@tpope
Copy link
Owner

tpope commented Oct 19, 2015

So are you getting the exact same error message?

@n10v
Copy link

n10v commented Oct 19, 2015

Not exactly the same

I type :Gwrite .
fugitive says: fugitive: file has uncommitted changes (use ! to override)

I type :Gwrite! .
fugitive says:

~/nehm
Error detecting while processing function <SNR>50_Write:
line 80:
E502: "~/nehm" is a directory
Press ENTER or type command to continue

P.S. ~/nehm is a root directory of my project

@tpope
Copy link
Owner

tpope commented Oct 19, 2015

Why are you passing a dot?

@n10v
Copy link

n10v commented Oct 19, 2015

To add all project
I thought that :Gwrite . is the same as git add .

@n10v
Copy link

n10v commented Oct 19, 2015

Or how to add all project?

@glittershark
Copy link

:Git add .

@tpope tpope closed this as completed Oct 19, 2015
@tpope tpope reopened this Oct 19, 2015
@n10v
Copy link

n10v commented Oct 19, 2015

Ok. Thanks @glittershark and @tpope
Problem solved

brendeschuijmert pushed a commit to brendeschuijmert/vim-fugitive that referenced this issue Aug 6, 2019
@tpope tpope closed this as completed Aug 16, 2019
brendeschuijmert added a commit to brendeschuijmert/vim-fugitive that referenced this issue Apr 13, 2020
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

4 participants