From: Philip Oakley Date: Mon, 25 Jul 2011 21:36:42 GMT Subject: Re: .gitignore for large files? Message-ID: <0F3C5B6B6420446A9D64B9394AA2BC4D@PhilipOakley> In-Reply-To: <7vd3gyrxtl.fsf@alter.siamese.dyndns.org> Subject: How to ignore large files? > Nguyen Thai Ngoc Duy writes: > >> While .gitattributes looks like a better place, it does not have >> "exclude" attribute equivalence to .gitignore. If I remember >> correctly, the way .gitignore and .gitattributes are implemented makes >> it very hard to turn .gitignore into part of .gitattributes >> implementation (gitattr checks .gitattributes of current dir first, >> then upward to parents, while .gitgnore follows the opposite >> direction). > > While I do not think it is necessarily a good idea to invent yet another > way to exclude and add it to the attributes mechanism (unless we will be > dropping the support for gitignore, which is not the case), I do not know > why you think the direction of the scan matters. > > A more important difference is that the attribute mechanism covers the > actual paths, not intermediate directories, unlike gitignore does. The choice of any actual implementation would depend on both feasability and usefulness. Duy was pointing out (to me?) the different approaches used for respecting the gitattributes and (multiple) gitignore files. My first thought had been to use the .gitignore file but I then realised the potential problems of adding more metacharacters ( > and < ). I've also just seen that 1.7.6 introduced the core.bigFileThreshold for memory management reasons, while this suggestion is to help folk avoid the mistake of unintentional committing of very large files without being warned. Does the concept (of warning/ignoring when files are 'large') have any merit? Philip