adjustTree: Consider submodule deletions

In addition to regular file deletions, the removefiles argument passed
to adjustTree may contain removed submodules.  When making the new
tree, filter these out in the same way that is done for regular files
so that the deletion is propagated.
This commit is contained in:
Kyle Meyer 2021-01-06 19:16:30 -05:00 committed by Joey Hess
parent c940b02cda
commit fd161da2c2
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -259,6 +259,7 @@ adjustTree adjusttreeitem addtreeitems resolveaddconflict removefiles r repo =
removeset = S.fromList $ map (normalise . gitPath) removefiles removeset = S.fromList $ map (normalise . gitPath) removefiles
removed (TreeBlob f _ _) = S.member (normalise (gitPath f)) removeset removed (TreeBlob f _ _) = S.member (normalise (gitPath f)) removeset
removed (TreeCommit f _ _) = S.member (normalise (gitPath f)) removeset
removed _ = False removed _ = False
addoldnew [] new = new addoldnew [] new = new