-
Notifications
You must be signed in to change notification settings - Fork 970
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
.git is being touched continuously #97
Comments
It seems that the |
Git writes and deletes an index.lock file into the |
The added moraxy@local:~/skript [master|✚ 4… 1644] $ GIT_INDEX_FILE=/tmp/bash_git_prompt_index git status -s -uall | grep -c "^??"
1644
moraxy@local:~/skript [master|✚ 4… 1644] $ git status -s -uall | grep -c "^??"
227
moraxy@local:~/skript [master|✚ 4… 1644] $ ~/.bash-git-prompt/gitstatus.py
master
.
0
0
4
227
0
0 |
@moraxy You should copy the file Edit: actually, a hard-link seems to work (and doesn't update |
That did it. But that means I would need to maintain a unique index copy for every repo plus some sort of update everytime something about the actual index changes, or not? |
I have reverted this for now, as I have to implement this differently as it seems. |
Please try it again. The |
Works fine, thank you and @tschottdorf for the quick response :) |
My pleasure! |
While normally not being an issue, in the case of working on Docker builds etc it will mean that the cache is invalidated all the time.
I haven't had the time to look into why that happens, but the .git directory is definitely touched every time the prompt displays. I've looked at the code that updates the HEAD ref, but that's not it (that will run every 5mins by default).
I'll look into this more when I get the chance but maybe it's obvious why this happens to anyone here?
The text was updated successfully, but these errors were encountered: