From: Junio C Hamano Date: Fri, 10 Sep 2010 00:26:21 GMT Subject: Re: [PATCH v2 1/2] convert: fix normalization of foreign idents Message-ID: <7vmxrqjvf6.fsf@alter.siamese.dyndns.org> In-Reply-To: Marcus Comstedt writes: > Since ident_to_worktree() does not touch $Id$ tags which contain > foreign expansions in the repository, make sure that ident_to_git() > does not either. This fixes the problem that such files show > spurious modification upon checkout. > > There is however one case where we want ident_to_git() to normalize > the tag to $Id$ despite the asymmetry: When committing a modification > to a file which has a foreign ident, the foreign ident should be > replaced with a regular git ident. Thus, add a new parameter to > convert_to_git() that indicates if we want the foreign idents > normalized after all. Would it be possible that the real culprit is that ident_to_worktree() does not always touch $Id$ in the first place? Why isn't "$Id: garbage$" first cleaned and then smudged upon checkout? It also smells wrong that this "sometimes we convert, sometimes we don't" is a special case for "$Id$" and for no other conversion. Why don't smudge/clean filter or CRLF conversion have the same issue that can be solved with the same approach as this patch takes?