jonas / tig

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

How to show file status in diff view? #1289

Closed GrandZhuo closed 8 months ago

GrandZhuo commented 1 year ago

We can see the modified file list in the diff view, like this:

path/tofile1 |  2 +-
path/tofile2 | 10 ----------

I want to add file status before file names like in the status view, for example:

M path/tofile1 |  2 +-
D path/tofile2 | 10 ----------

The most important thing is that without the file status I can't clearly know if the modification deleted the whole file or only part of the code in the file.

I found that pass --raw to diff-options to be somewhat useful but not perfect because the modified file list is shown twice.

:100755 100755 b0476170 8e547f09 M  path/to/file1
:100644 100644 1f09f7af 73fdaf81 M  path/to/file2
 path/tofile1 |  2 +-
 path/tofile2 | 10 ----------

So how can I just add the file status only before file names like in the status view?

koutcher commented 1 year ago

Unless there is a git option to do so, you can't.