git: Use tree paths instead of iterators to track the selected log viewer branch