jonas / tig

Text-mode interface for git
https://jonas.github.io/tig/
GNU General Public License v2.0
12.41k stars 607 forks source link

refresh-mode periodic does not update branch labels #1270

Closed Debilski closed 11 months ago

Debilski commented 1 year ago

I have set

git config tig.refresh-mode periodic
git config tig.refresh-interval 1

When I create new commits in one window and have tig running in another, it will update to integrate the new commit but the [main] branch tag will not be moved. Similarly, when creating new branches or switching branches, the labels will not be updated either.

Test session:

window 1:

$ git commit --allow-empty -m "Initial commit."
[main (root-commit) c2b1c67] Initial commit.

window 2:

$ tig
2023-02-28 14:46 +0100 Firstname Lastname I [main] Initial commit.

then, window 1:

$ git commit --allow-empty -m "Second commit."
[main 0b51031] Second commit.

window 2 (the commit appears but it is not [main]):

2023-02-28 14:46 +0100 Firstname Lastname o Second commit.                                                                                                                                                                                                                 
2023-02-28 14:46 +0100 Firstname Lastname I [main] Initial commit.

then, window 1:

$ git branch newbranch
$ git switch newbranch

window 2 (completely unchanged):

2023-02-28 14:46 +0100 Firstname Lastname o Second commit.                                                                                                                                                                                                                 
2023-02-28 14:46 +0100 Firstname Lastname I [main] Initial commit.

Hitting R in window 2:

2023-02-28 14:46 +0100 Firstname Lastname o [main] [newbranch] Second commit.                                                                                                                                                                                              
2023-02-28 14:46 +0100 Firstname Lastname I Initial commit.
ilyagr commented 9 months ago

Thank you so much for fixing this! :)