[RFC/PATCH 0/3] limit the size of the packs we receive
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Aug 15, 2016, 19:57 UTC
- Message-ID
- <20160815195729.16826-1-chriscool@tuxfamily.org>
In https://public-inbox.org/git/20150612182045.GA23698%40peff.net/, Peff sent a patch that is used by GitHub to abort `git receive-pack` when the size of the pack we receive is bigger than a configured limit.
GitLab is interested in using the same approach and in standardizing the error messages the user could get back.
So I rebased Peff's patch to the current master, refreshed it a bit, split it, and added the missing --max-input-size=<size> option to `git unpack-objects` - to make it work for all `transfer.unpacklimit` values - in a new patch.
There is no documentation yet for the `--max-input-size=<size>` options added to `git index-pack` and `git unpack-objects`, nor for the new `receive.maxsize` config option.
I kept Peff as the author of the patches that are made mostly from his patch, but I added my Signed-off-by to them.
Christian Couder (1): unpack-objects: add --max-input-size=<size> option
Jeff King (2): index-pack: add --max-input-size=<size> option receive-pack: allow a maximum input size to be specified
builtin/index-pack.c | 5 +++++ builtin/receive-pack.c | 12 ++++++++++++ builtin/unpack-objects.c | 7 +++++++ t/t5546-push-limits.sh | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 71 insertions(+) create mode 100755 t/t5546-push-limits.sh
-- 2.10.0.rc0.4.g229e32c.dirty