Re: Please consider extending .gitignore to support setting of a file size limit

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

 



Roger Mendes <sproger1@xxxxxxxxx> writes:

> Allow .gitignore to support setting a file size limit so that all
> files over a certain size will by automatically ignored when
> performing git add, commit -a...;

No.

I would not say that it would not make sense to have a method to
tell your Git to reject an attempt to add certain files to the
index, but .gitignore is make that decision based on paths and
is a bad place to do any other decision, so take the above "No"
as "No, we do not consider butchering .gitignore for that", not
as "No, you shouldn't base your decision on file size".

Also, once the path is tracked, then "git add" will keep tracking it
unless and until you "git rm --cached" it.  So you may "git add" a
1kB file, grow the file to 500MB and then the next "git add" should
register the updated contents to the index.  Whatever you do when
designing that new feature, you should need to take that into
account.

Having said all that, why is it that you do not want to track
certain files that happen to be large?  Don't the existing large
file support facility work for you (or perhaps you are not using
them)?  It might be that your time is better spent on improving
that, instead of working around the issue, no?




--
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]