"git checkout" safety feature

Hi,
A recent discussion on LWN https://lwn.net/Articles/770642/ noted that
"git checkout <release> <file…>" does not warn if one if the files has
been modified locally, nor is there an option to do so.
IMHO that should be fixed, preferably by somebody who knows git's
internals well enough to do so in half an hour ;-)
--
-- Matthias Urlichs