datalad / datalad-next

DataLad extension for new functionality and improved user experience
https://datalad.org
Other
6 stars 7 forks source link

Support for detection of (un)staged changes? #730

Open mih opened 3 weeks ago

mih commented 3 weeks ago

ATM we run git diff-index without --cached. This gives us all changes. In most cases we can tell if something is staged, because a non-None gitsha property is reported.

The one (?) exception are deletions. These have no gitsha property (of course), and only a git diff-index --cached would reveal their potential unstaged nature.

This appears to be the last aspect that prevent next-status from reporting index state. Here is what this looks like in a local draft (the plus-character indicates "staged"):

image