check for changed files when discarding all changes
check for changed files when discarding all changes

Also fixes a bug where options was referred to when it was undefined.

jupyterlab/jupyterlab-git,jupyterlab/jupyterlab-git,jupyterlab/jupyterlab-git