Ah, now I understand what you mean! Your suggestion is to make it dirty too when untracked files are staged, not by just they mere existence in the working tree. That makes more sense. Still not convinced it will modify dmd's build but seems like an enough rare case to just make it dirty.

I got confused because `-uno` doesn't affect the reporting of added (untracked but staged) files, it just doesn't report plain untracked (not added) files, what is excluding added files is the `grep` bit. But using `-uno` is good, it seems to be a fair simplification to just consider any change in the git index to trigger the -dirty flag.

I just updated the commit again.