Re: serious performance issues with images, audio files, and other "non-code" data
- From
- John <john@puckerupgames.com>
- Date
- May 24, 2010, 06:44 UTC
- Message-ID
- <4BFA2054.6060002@puckerupgames.com>
- In-Reply-To
- <20100524053955.GA4528@coredump.intra.peff.net>
I agree, no defaults are better than arbitrary defaults. So why is the default "text"?
On 05/24/2010 01:39 AM, Jeff King wrote:
Show 39 quoted lines
> On Sun, May 23, 2010 at 08:21:12PM -0400, John wrote: > >> *.jpg binary -delta >> *.png binary -delta >> *.psd binary -delta >> *.gz binary -delta >> *.bz2 binary -delta >> .. and so on. >> >> [...] >> >> Is there any reason why someone would NOT want the above >> ".gitattributes" defined by default? > > I delta jpgs in one of my repositories. It is useful if the exif > metadata changes but the image data does not. I assume you could do the > same with other formats which have compressed and uncompressed portions > (I also do it with video containers). I don't think it would ever make > sense to try to delta gzip'd or bzip'd contents. > > I also don't use "binary", as I use a custom diff driver instead (binary > implies "-diff"). > > As for what should be the default, until now the default has always > been that no gitattributes are defined by default. This is nice because > it's simple to understand; git doesn't care about filenames unless you > tell it to. The downside obviously is that it may not perform optimally > for some unusual workloads without extra configuration. > > We could probably do defaults for some common extensions, but I'm not > really sure where such a thing should end up. For example, I consider > *.psd a uselessly obscure extension, as Adobe doesn't write software for > my platform of choice. Not that I mind having it in git, but rather that > we are inevitably going to miss somebody's pet extension, and then we > are right back where we started with them needing to configure, except > now they also have to figure out which extensions have default > attributes. > > -Peff