In svn, a change in a keyword value does not count as a change; the file does not indicate as modified and the result of "svn diff" is empty.
hmm, that is useful (and logical for cvs and svn) but i did not yet notice such a feature with git. at least by default it has no concept of keywords but even if it could ignore keyword values in a diff, it could only do so if keyword expansion is activated for which (i believe) it would be necessary to remove the keyword values on checkin. (which is the issue we are discussing)
greetings, martin.
hmm, that is useful (and logical for cvs and svn) but i did not yet notice such a feature with git. at least by default it has no concept of keywords but even if it could ignore keyword values in a diff, it could only do so if keyword expansion is activated for which (i believe) it would be necessary to remove the keyword values on checkin. (which is the issue we are discussing)
From gitattributes(5):
ident When the attribute ident is set for a path, git replaces $Id$ in the blob object with $Id:, followed by the 40-character hexadecimal blob object name, followed by a dollar sign $ upon checkout. Any byte sequence that begins with $Id: and ends with $ in the worktree file is replaced with $Id$ upon check-in.
My converter automatically sets this attribute for cvs files that had keywordexpansion enabled.
that part is clear. but how does it treat diffs?
greetings, martin.
that part is clear. but how does it treat diffs?
What kind of diffs? Diffs between committed versions will typically both have $Id$. For diffs between checked out files and the repository, git replaces the $Id: ... $ string with $Id$ before the comparison.
Hmm... It does however seem like the git documentation isn't correct; it seems also $Id: ... $ strings are replaced on checkout.
What kind of diffs? Diffs between committed versions will typically both have $Id$. For diffs between checked out files and the repository, git replaces the $Id: ... $ string with $Id$ before the comparison.
Hmm... It does however seem like the git documentation isn't correct; it seems also $Id: ... $ strings are replaced on checkout.
FYI: I've now patched the git source code to fix several issues (the above among others) with git's handling of the `ident` attribute. The courageous can try the patches on the grubba/ident branch of git://pike-git.lysator.liu.se/git.git/.git
are you planning to submit those fixes to git upstream? it would be inconvenient to need a custom git implementation to make the import script (or worse the repository) work well.
greetings, martin.
are you planning to submit those fixes to git upstream?
Yes, I've submitted them to the git mailing list.
it would be inconvenient to need a custom git implementation to make the import script (or worse the repository) work well.
True.
pike-devel@lists.lysator.liu.se