status: ensure that untracked images can be staged
commit43d0daec43ca71a243bb02e50313f5d89d2cd489
authorDavid Aguilar <davvid@gmail.com>
Sat, 15 Oct 2022 21:10:08 +0000 (15 14:10 -0700)
committerDavid Aguilar <davvid@gmail.com>
Sat, 15 Oct 2022 21:16:58 +0000 (15 14:16 -0700)
tree46be23e27ee016366012085f3af624b0bc1c46ca
parent0baa4168a8e8dfa832c1588247a79587fc4dda18
status: ensure that untracked images can be staged

Enhance the tracking of modes to better differentiate between untracked
files that we can't diff (eg. binary files), untracked diffable files
and when we are displaying arbitrary text.

This allows us to better handle image files by being able to track when
files can be staged vs. files that can be partially staged.

Update the context menus for the status and diff widgets to be aware of
this distinction. This ensures that image files have a "Stage" entry in
their context menu.

Closes #1265
Reported-by: Gianni Lerro @glerroo via github.com
Signed-off-by: David Aguilar <davvid@gmail.com>
CHANGES.rst
cola/cmds.py
cola/models/main.py
cola/widgets/diff.py