On Jan 11, 2008, at 1:02 AM, Linus Torvalds wrote:
Are you also for "autocrlf=input" as the default on Unix? This
is the second half of the solution to the cross-platform problem ...
... and then Windows and Unix users would have the same chance of
data corruption.
Which is very low, yes, but unfortunately it already hit me once
and I didn't immediately recognized what happend. I guess that
less experienced git used would have a harder time to understand.
However, I don't have a test case at hand. I should probably
better go and find one. So for now, you may just want to ignore
this comment.
Yet, I'm a bit paranoid about the potential data corruption. The
way data would be corrupted during commit can't be easily fixed.
You only have a chance for fixing this if you recognize the
problem before you delete the file in your work tree. But
because git is extremely good at preserving your data once you
committed a file, I tend to feel _very_ safe after I committed and
I am teaching all people that once they committed data to git
they'll not loose it until the reflog expires (well and obviously
they must not delete .git).
Looking on the content seems the right thing to do. The filetype
extension could be misleading.
Maybe a mechanism similar to the file command would be more
valuable. I guess a stripped down variant should be sufficient.
Steffen
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html