Re: .gitignore for large files?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 25, 2011 at 1:53 PM, Philip Oakley <philipoakley@xxxxxxx> wrote:
> Duy,
>
> The .git attributes is a good call. I'm thinking that it would be a global
> flag (i.e. is a max file limit in place at all on this repo), and then a set
> of limits, initially one for 'text' and one for 'binary' (and possibly a
> third for anything with an ext diff), and probably use a similar attribute
> format as used for setting diff attributes and its filters to set a per file
> type limit [if required]

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).

But the other way might be simpler: introduce a new attribute, then
make use of the attribute in exclude code like autogenerated
.gitignore. I don't know. I have not thought through this idea.

But of course you can stay away from those by checking new attributes
in builtin/add.c and refusing to execute if someone wants to add a
file larger than a limit. You can avoid git-add internal business by
checking entries in to-be-written index, at label "finish" in
cmd_add(). This is the simplest way (and getting very close to using
hooks).

Anyway, good luck. Come back with some patches ;-)
-- 
Duy
--
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


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]