Is there a way to force git not to create index.lock for read-only operations like git status
?
I'm displaying the status of my working tree in tmux, being updated every couple of seconds. Basically I parse the output of git status --branch --ignored --porcelain
and a few other commands. Problem is, that for large repositories git status
can take a few seconds to complete. During that time I cannot run any other git commands because the repository is locked.
EDIT:
Here are some pictures of the relevant part of my tmux line. Description for symbols from left to right:
In sync with remote branch | 2 staged changes | 1 unstaged change | 5 ignored files | 1 stash entry:
In sync with remote branch | no changes in working tree | 5 ignored files:
Ahead remote branch by 1 commit | no changes in working tree | 5 ignored files: