Re: [PATCH 3/3] grep: stop looking at random places for .gitattributes
From: Michael Haggerty <hidden>
Date: 2016-06-15 22:54:59
On 10/11/2012 07:55 AM, Johannes Sixt wrote:
Am 10/10/2012 21:44, schrieb Junio C Hamano:quoted
Johannes Sixt [off-list ref] writes:quoted
Is there already an established definition which the "correct" .gitattributes are?No, and it is deliberately kept vague while waiting for us to come up with a clear definition of what is "correct"....quoted
Very often, people retroactively define attributes to correct earlier mistakes.Absolutely. I have Windows resource files that are Shift-JIS encoded checked in long ago, and I want to retoactively declare them with "encoding=Shift-JIS" because I prefer to see Japanese script in gitk rather than gibberish.
Maybe I'm being too much of a purist, but I don't think that git should retroactively reinterpret history on its own initiative in a way that might not be correct (e.g., maybe your encoding changed from ASCII to Shift-JIS sometime in the past). It would be more appropriate for this to happen only if explicitly requested by the user. For example, why don't you override the incorrect historical attributes via .git/info/attributes? Michael -- Michael Haggerty mhagger@alum.mit.edu http://softwareswirl.blogspot.com/