jonas / tig

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

[Feature Request] Show modified timestamps (mtime) for files in the Unstaged view #1297

Closed adamency closed 1 month ago

adamency commented 1 year ago

It would be great to be able to see the dates of last modification of files in the "Unstaged changes" diff view of tig (and by extension, but less importantly in the "Untracked" view).

This would allow us to quickly check the most recent unstaged modifications, which are most often the ones (or among the ones) we want to commit. I believe this would add ease of use (even if slightly) to most users, while not being very hard to implement (although I don't know myself where to begin implementing this in the codebase).

I think the most intuitive way would be to display the date in basically the same way as in with :toggle date (D shortcut) for commits, but instead for files in the "Unstaged changes" view.

Do you believe this could be added to tig ?

koutcher commented 1 year ago

The diff and stage views don't have columns (beside the line number) and just display the result of the underlying git command, so unless there is a git option to add it to the diffstat, that wouldn't be easy.