Subject: [PATCH 0/4] upload-pack: custom allowed object filters

From: Taylor Blau <[email-masked]>
Date: Thu, 2 Jul 2020 16:06:14 -0400

Hi,

Here are some patches that I sent a while ago [1] as an RFC, but are now
ready for an actual review. Not much has changed from the original
patches, but a few things have. Namely:

  - the 'uploadpack.filter.tree.maxDepth' configuration is new,

  - they are rebased forward on top of Christian's various upload-pack
    clean-ups, so they should apply cleanly to 'master' (in fact, they
    were rebased to the tip of master, not just Christian's various
    series), and

  - the patches have been substantially cleaned up and now have
    Signed-off-by trailer

As a reminder, these are the patches that we have been using at GitHub
to allow only certain kinds of object filters when serving partial
clones. If it is of interest, our configuration looks something like the
following:

  [uploadpack]
  	allowAnySHA1InWant = true
  	allowFilter = true
  [uploadpack "filter"]
  	allow = false
  [uploadpack "filter.blob:limit"]
  	allow = true
  [uploadpack "filter.blob:none"]
  	allow = true
  [uploadpack "filter.tree"]
  	allow = true
  	maxDepth = 0

Thanks in advance for your review (and thanks also to Peff, Christian,
Eric, and Junio for their help and discussion already).

[1]: https://lore.kernel.org/git/[email-masked]/

Thanks,
Taylor

Taylor Blau (4):
  list_objects_filter_options: introduce 'list_object_filter_config_name'
  upload-pack.c: allow banning certain object filter(s)
  upload-pack.c: pass 'struct list_objects_filter_options *'
  upload-pack.c: introduce 'uploadpack.filter.tree.maxDepth'

 Documentation/config/uploadpack.txt |  22 ++++++
 list-objects-filter-options.c       |  23 ++++++
 list-objects-filter-options.h       |   6 ++
 t/t5616-partial-clone.sh            |  34 +++++++++
 upload-pack.c                       | 104 ++++++++++++++++++++++++++++
 5 files changed, 189 insertions(+)

--
2.27.0.225.g9fa765a71d