Patch Set 2:

No Robin, this change isn't the same as I2b2170c2. It's more like I2b2170c2 depends on this one. The change here introduces methods to compare a workingtree- and index-entry purely by metadata and the change I2b2170c2 makes use of this methods to reuse a SHA-1 if possible.