Stefan Monnier writes: >>> Is it really all it takes to detect `conflict' state? >> Git conflict state detection worked when I implemented the feature many >> moons ago, although it was not 100% reliable. It doesn't work anymore. >> Maybe something was lost on one of the many merges. > > Could you try and make it work again and submit/install the patch for that? I've revised the initial commit implementing conflict state detection on my private branch and the problem with it was that it didn't detect edited state on a staged file, i.e. a file containing staged (but uncommitted) changes would show as up to date. So I pursued a more precise method. The problem is that the git commands that tells you that a file is unmerged doesn't tell that a file contains changes if those are staged. The solution is to execute two git commands: the first one informs about edited (but unstaged) files plus unmerged files. If that command says that the file is up to date, a second command is executed for detecting staged changes. The problem with this approach is that on some platforms (i.e. Windows) invoking git is slow. The delay is already noticeable when the modeline is updated. Adding yet another call makes things somewhat worse. I CC'ed Dmitry as he implemented the part that my patch touches. I'll like to get the ok from him before installing the patch, if you (Stefan) think that conflict detection is valuable enough to warrant an extra git invocation.