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

fatal: Unable to create '/path/.git/index.lock': File exists. #9

Closed
c02y opened this issue Dec 17, 2019 · 3 comments
Closed

fatal: Unable to create '/path/.git/index.lock': File exists. #9

c02y opened this issue Dec 17, 2019 · 3 comments

Comments

@c02y
Copy link

c02y commented Dec 17, 2019

After using gitmux in tmux, from time to time, a problem occurs to me:

fatal: Unable to create '/path/.git/index.lock': File exists.

I think this is because git is kept running in the background inside gitmux with tmux.

and I used an script before using gitmux:
https://github.com/c02y/dotfiles/blob/5cbcbda2d49d0f0458fc404b57c5ab0fbd9def7a/bin/.local/bin/pane-border-format.sh#L50

I use --no-optional-locks for git command in that script to avoid this problem, could you please fix this issue.

@arl
Copy link
Owner

arl commented Dec 17, 2019

Thank you for that.
I wasn't aware of this option.
It happened also to me from time to time, though rarely enough to not be on my priority list, but was painy enough to be reminded of!
That was the n1 issue that prevented me to publicize gitmux over tmux-gitbar.
Thanks again I'm gonna bake this right into the Go binary so that gitmux can be safely called !!!

arl added a commit that referenced this issue Dec 17, 2019
By bumping gitstatus to v0.4.2 we're now calling git with
GIT_OPTIONAL_LOCKS set to 0, ensuring gitstatus does not lock the
working tree for its operations, effectively giving higher
priority to user-initiated operations. This is useful when gitmux
is run in the background.

Fixes #9
@arl arl closed this as completed in 5282f48 Dec 17, 2019
@arl
Copy link
Owner

arl commented Dec 20, 2019

This is fixed in the latest release

@c02y
Copy link
Author

c02y commented Dec 22, 2019

@arl Yes, I got it when you closed this issue with new commit, thanks.

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