Browse Source
The checkout command was producing an inconsistent state of the index which even confuses native git. The content sha1 of the touched index entries was updated, but the length and the filemode was not updated. Later in coding the index entries got automatically corrected (through Dircache.checkoutEntry()) but the correction was after persisting the index to disk. So, the correction was lost and we ended up with an index where length and sha1 don't fit together. A similar problem is fixed with "lastModified" of DircacheEntry. When checking out a path without specifying an explicit commit (you want to checkout what's in the index) the index was not updated regarding lastModified. Readers of the index will think the checked-out file is dirty because the file has a younger lastmodified then what's in the index. Change-Id: Ifc6d806fbf96f53c94d9ded0befcc932d943aa04 Signed-off-by: Christian Halstrick <christian.halstrick@sap.com> Signed-off-by: Jens Baumgart <jens.baumgart@sap.com> Bug: 355205stable-1.2
Christian Halstrick
13 years ago
2 changed files with 77 additions and 22 deletions
Loading…
Reference in new issue