diff -r 7138c863d0a1 -r 04d1f17f49e7 mercurial/context.py --- a/mercurial/context.py Fri May 28 11:48:59 2021 +0200 +++ b/mercurial/context.py Mon May 31 18:35:44 2021 +0200 @@ -1840,7 +1840,7 @@ def _poststatusfixup(self, status, fixup): """update dirstate for files that are actually clean""" poststatus = self._repo.postdsstatus() - if fixup or poststatus: + if fixup or poststatus or self._repo.dirstate._dirty: try: oldid = self._repo.dirstate.identity()