Closed goldylucks closed 5 years ago
Interesting use case! By default, .git directories are ignored by when-changed. See https://github.com/joh/when-changed/blob/master/whenchanged/whenchanged.py#L53 You can comment out that line and it should work.
Thanks for the response!
I commented that line out, restarted gnome, opened a fresh terminal, and still doesn't work :/
any other ideas we can try?
Hmm, it works for me here. Did you remember to install your modified version with pip install .
?
Btw, to run git log whenever you change branches it might be better to watch .git/HEAD...
Hmm, it works for me here
So now it only refreshes if I focus on the terminal and press q
. For you it refreshes automatically when you change a branch or add a commit?
I can't get that to work :/
Do you have a vid/gif showing it in action? to make sure we are talking about the same behavior here.
Ah, your git log is probably waiting for pager input. Try with git --no-pager log
instead.
ok that works, thanks for pointing that out! now I'm seeing many "re-renders" of git log when I make a change:
TBH, working with watch
is fine by me, just would be nice to not poll if I can listen to changes, but don't sweat about it, so feel free to close this issue.
my idea might be a very edgy use case
You could try the -1
option. Also maybe use clear && git --no-pager log
as the command.
Thank you so much for this project!
Anything I'm doing wrong?
The same command works with linux's built in
watch
: