gitui
gitui copied to clipboard
fix: disable blame and history popup for untracked files
An untracked file does not have any history data. Right now when you press B for the blame popup or the H for the history popup you get an empty popup where the title spins endlessly trying to find the file in the commit history, and show relevant information. This commit
It changes the following:
- disables the two actions in the
StatusTreeComponent, when the selected item is a file which is not tracked by git.
I followed the checklist:
- [ ] I added unittests
- [x] I ran
make checkwithout errors - [x] I tested the overall application
- [ ] I added an appropriate item to the changelog
I have run make check. The only error reported by clippy is this.
Hope this is okay. I think it could be addressed in another PR to refactor the cognitive complexity of the event function
I would add #[expect(clippy::cognitive_complexity)] to the function. make check should not fail. The refactor should be done in a future pr.
I have added #[expect(clippy::cognitive_complexity)] to the function. Now make check passes.
@kpbaks thanks for your contribution. please add a changelog entry and its good to go
Added entry to CHANGELOG.md