Git: Preserve check state for untracked files

Untracked files always appear last, so filename comparison fails for
them.

Change-Id: I6e0addaddec7ca423b3d63e3e71fe00dbc6ca95e
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Orgad Shaneh
2013-11-05 11:59:42 +02:00
committed by Orgad Shaneh
parent 9b52133b1d
commit f18bc27a39

View File

@@ -64,7 +64,9 @@ public:
if (isCheckable(i) && source->isCheckable(j))
setChecked(i, source->checked(j));
break;
} else if (stateFile < sourceStateFile) {
} else if (((stateFile.first & UntrackedFile)
== (sourceStateFile.first & UntrackedFile))
&& (stateFile < sourceStateFile)) {
break;
}
}