Fix dirty index errors when resolving conflicts

The patch 6e8fdc58c786a45d7a63c5edf9c702f1874a7a19 causes StGit to raise
"warnings" (actually: errors) in the event that there are changes staged in
the index and a refresh is performed without specifying either --index or
--force. This is great for preventing an entire class of common mistakes,
but is also a giant pain when resolving conflicts after a pull/rebase.
Depending on the workflow in use, this may occur with a frequency anywhere
between "never" and "mulitple times on every pull".

This patch removes the pain by:
 - Reporting unresolved conflicts *before* complaining about staged
   changes, since it goes without saying that, when present, these are the
   main problem.
 - Not complaining about staged changes if there are no unstaged changes in
   the working directory, since the presence of --index is immaterial in
   this case.

Signed-off-by: Zane Bitter <zbitter@redhat.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
1 file changed