Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

hyper-statusline causes index.lock errors in large repos #32

Open
tylerfowle opened this issue Feb 3, 2017 · 7 comments
Open

hyper-statusline causes index.lock errors in large repos #32

tylerfowle opened this issue Feb 3, 2017 · 7 comments

Comments

@tylerfowle
Copy link

when in a very large repo (8+gigs), hyper-statusline will interfere with git commands and cause a lock

fatal: Unable to create '<path to repo>/.git/index.lock': File exists. If no other git process is currently running, this probably means a git process crashed in this repository earlier. Make sure no other git process is running and remove the file manually to continue.

@henrikruscon
Copy link
Owner

@tylerfowle

I'm not sure what the best approach to solve this issue is. I could check if index.lock exists and based on that delay the call, but it doesn't feel ideal. Any suggestions? ✌️

@tylerfowle
Copy link
Author

@henrikdahl unfortunately no, this is a little beyond me. not exactly a direct fix, but maybe an option to turn on/off the git status would be helpful.

@jylertones
Copy link

I get this same error on a 2.1GB repo. Strange thing is I only see the error on some commands. I don't know if this helps at all, but git pull and git push work fine, but often git stash and git commit -m fail with this error.

I would love to help - I've been walking through the middleware events that Hyper exposes and I don't see any obvious events that could better trigger the dirty checks.

@JackWReid
Copy link

I had to remove hyper-statusline for this reason. Perhaps you could check for a lock before polling git like you suggest?

@henrikruscon
Copy link
Owner

Took another look at this.

Problem is basically that hyper-statusline performs a dirty check that can take a long time in larger repos which may cause a git index lock when trying to perform other git commands simultaneously.

In the latest commit I changed the dirty check to ignore untracked files, which should speed it up immensely and solve the issue for some of you.

Another solution could be git-update-index. But I'm not sure that hyper-statusline should be enforcing that instead of the specific user having an issue with a large repo.

Let me know how it works ✌️

@ocarreterom
Copy link

I have this problem only when working on a rebase. Random commits are cancelled due to index.lock errors.

hyper 2.1.1
hyper-statusline 1.7.6

@shnhrrsn
Copy link

Ah this has been driving me insane for weeks. I finally tried my rebase in a large repo in Terminal on a whim and it worked and quickly realized this plugin was the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

6 participants