dulwich icon indicating copy to clipboard operation
dulwich copied to clipboard

`index.build_index_from_tree` doesn't remove files from index

Open aigielsk opened this issue 6 years ago • 1 comments

Hi, this is somehow related to #588 and causes the reset to not work at least in some circumstances. The method index.build_index_from_tree first initializes the index from the current index file and then adds the files that are in the referenced tree. However if the referenced tree has less files - they are not deleted from the index and the index is not reset correctly. BR Andrzej

aigielsk avatar Sep 26 '19 12:09 aigielsk

reset should probably use a different call - build_index_from_tree is meant for fresh checkouts.

jelmer avatar Sep 27 '19 00:09 jelmer