Closed marcoSven closed 1 year ago
The issue goes away once I modified a file
Hi @marcoSven thanks for the report. I'm not sure I totally get what's happening. What is flickering exactly? Is it the zone of tmux status bar where gitmux gets printed? Do you think the flickers come from the fact that gitmux sometimes returns something and sometimes doesn't? Gitmux output should be deterministic, the same set of inputs should always give the same output. Are you using the -timeout parameter when calling gitmux from your tmux.conf ?
Do you think the flickers come from the fact that gitmux sometimes returns something and sometimes doesn't
Correct you can see the "flickering" in the video
the same set of inputs should always give the same output
I am not sure what input changes there no changes as far as I know - again see the video
Are you using the -timeout parameter when calling gitmux from your tmux.conf
Yes I am gitmux -timeout 580ms
I wanted to experiment with the -timeout
but now even after resting my change, that fixed the issue as I mentioned above, I can no longer reproduce the issue 🤷
Any idea what could be causing this? Should I remove the timeout? Is there a debug log other than -dbg
? Now that I can't reproduce the issue -dbg
is returning the same as when I saw the issue.
Yes I am
gitmux -timeout 580ms
Ok so that sound like this could be the cause of the flickering then. The timeout flag has been added at the request of users working with particularly big repositories. At that time, gitmux was integrated with bash SHELL_COMMAND, meaning gitmux wouldn't give back the control of the shell to the user before finishing computing the status. On big repos, this can take time.
Now, gitmux is not using SHELL_COMMAND anymore and is ran in an asynchronous fashion by tmux when needed. That's why the timeout option probably is not useful anymore.
I don't know how you came up with this specific value, but it does seem low. On a big repository like neovim, you're probably hitting the timeout when you experience the flickering.
I'd increase to 1s
or 2s
, or even remove it unless you have a good reason.
I'm also curious to know how much time gitmux does take to process the repo with time gitmux
We wrote past each other @marcoSven 😁
😄
I'd increase to 1s or 2s, or even remove it unless you have a good reason.
Thank you that makes sense I will test removing it completely for now.
how much time gitmux does take to process the repo
#[fg=default]#[fg=default]#[fg=white,bold]⎇ #[fg=default]#[fg=white,bold]master #[fg=default]#[fg=cyan]origin/master#[fg=default] - #[fg=default]#[fg=green,bold]✔#[fg=default,bg=default]gitmux $PWD 0.01s user 0.05s system 162% cpu 0.041 total
Feel free to close the issue I will report back if I see it again.
Thank you so much for the fast response!
Thank you so much for the fast response!
Happy to help, plus I'm in a 8-hour train right now. I'm closing, feel free to open in case
Describe the bug
I noticed that intermittently gitmux returns nothing.
To Reproduce
Today I was able to consistently reproduce the issue.
I cloned Neovim and attached to TMUX see video below. I have another repository open in a second window where it currently works. I do notice that intermittently it also experiences the same issue in that repository, it is rare though.
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Environment:
gitmux.cfg
if you're not using the default one.tmux: symbols: branch: ' ' hashprefix: ':' ahead: '' behind: '' staged: '' conflict: '!=' untracked: '' modified: '' stashed: '≡' clean: '' insertions: '' deletions: '' styles: state: '#[fg=red]' branch: '#[fg=magenta]' staged: '#[fg=green]' conflict: '#[fg=red]' modified: '#[fg=blue]' untracked: '#[fg=yellow]' stashed: '#[fg=gray]' clean: '#[fg=green]' divergence: '#[fg=magenta]' layout: []
Additional context Add any other context about the problem here.
At some point the flickering stops and gitmux returns nothing. This is the first time I see that gitmux is not able to recover.
https://github.com/arl/gitmux/assets/3860298/7719b184-4496-4d56-84fb-5bfa99d419b4