Re: Fix for normalization of foreign idents
From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:49:22
Hi, Marcus Comstedt wrote:
$Id: blah$ --(c_t_w_t)--> $Id: blah$ --(c_t_g)--> $Id: blah$ This restores correct and deterministic operation of status and diff, meaning that if the file hasn't actually been modified, no modifications are shown. As you might suggest, always keeping the foreign ident would mean it is never updated when you commit new versions of the file, which isn't really what we want. Keeping the foreign ident as long as the last modification to the file was made in the previous version control system makes perfect sense, but once we make a commit to the file within git, it should be replaced with a git ident.
I was with you up to here. Is commit time really the right moment to clobber a foreign ident? I suspect it would be confusing. It might be simpler to just never clobber a foreign ident and instead rely on local policy (scripts, pre-commit hooks, and so on) to remove them at the appropriate time.