Better dirty working copy detection