I use smart-mode-line package and I noticed when I change/checkout branches in command line, or in Magit, this is not reflected in the Smart Mode Line. I still see the name of the old branch, while I checked out the other branch.
I need to call M-x revert-buffer
to see the actual branch reflected in Smart Mode Line.
These option gives me an error, while in documentation I need to supply REVISION in magit-checkout parameter, which is unknown in Emacs Lisp as variable:
(add-function :after (magit-checkout) #'revert-buffer)
And this didn't help either:
(setq magit-auto-revert-mode t)
So I'm running out of ideas. Anyone?
(advice-add 'magit-checkout :after #'revert-buffer)
force-mode-line-update
.