Eyvind Bernhardsen <eyvind.bernhardsen@xxxxxxxxx> writes: > On 24. juni 2010, at 22.21, Junio C Hamano wrote: > >> Finn Arne Gangstad <finnag@xxxxxxx> writes: >> >>> If .gitattributes is different on the different sides, or if you >>> enable autocrlf, the current repo contents may change after >>> git-to-worktree and worktree-to-git again. >> >> IOW, g2w-then-w2g may not be an identity function. >> >> If we were to encourage use of this codepath to wider audiences, we may >> need to have a document for people who write smudge/clean filters. In >> order for the result to be stable, applying g2w-then-w2g once again on top >> of the result of running g2w-then-w2g on anything should be no-op, no? > > Hm. Isn't that already a requirement? If a clean filter doesn't clean > to something normalized, simply touching a file could result in spurious > differences (much like pre-safe-autocrlf autocrlf). I could well be > missing something here, though. A natural expectation would be that g2w-then-w2g is an identity function, I think. But the "feature" under discussion in this thread depends on that g2w-then-w2g is _not_ a noop (otherwise it wouldn't do us any good). IOW, we are suggesting authors of clean/smudge to make their g2w-then-w2g perform more than just a round-trip but actively _clean things up_, aren't we? I don't think we have documented that suggestion, and I actually think we might even have said that g2w-then-w2g should be a no-op somewhere in the documentation. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html