5b85fba0df
is_dirty_cmd() uses `git diff --shortstat` to see if the repo can be safely checked out. This only checks for the modified files and does not take the cached(staged) files into account. There can be cases where the cached changes could be overwritten by a checkout. In this case, the git checkout command aborts with an error message telling the user to commit or stash their changes. Use `git diff-index HEAD --shortstat` to determine if there are any changes in the tracked files, whether cached or not. https://git-scm.com/docs/git-diff-index Signed-off-by: Abdur Rehman <abdur_rehman@mentor.com> |
||
---|---|---|
.. | ||
__init__.py | ||
__main__.py | ||
__version__.py | ||
build.py | ||
config.py | ||
configschema.py | ||
includehandler.py | ||
kas.py | ||
libcmds.py | ||
libkas.py | ||
repos.py | ||
shell.py |