Re: [PATCH v7 09/16] fetch: support filters
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Aug 19, 2018, 11:24 UTC
- Message-ID
- <CACsJy8D3nC+fXFYMKWh6AStbMVOVfmcAvAT9tBqtG9K6r043eQ@mail.gmail.com>
- In-Reply-To
- <20171208155851.855-10-git@jeffhostetler.com>
On Fri, Dec 8, 2017 at 5:00 PM Jeff Hostetler <git@jeffhostetler.com> wrote:
Show 39 quoted lines
>
> From: Jeff Hostetler <jeffhost@microsoft.com>
>
> Teach fetch to support filters. This is only allowed for the remote
> configured in extensions.partialcloneremote.
>
> Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
> ---
> builtin/fetch.c | 23 +++++++++++++++++++++--
> connected.c | 2 ++
> remote-curl.c | 6 ++++++
> t/t5500-fetch-pack.sh | 36 ++++++++++++++++++++++++++++++++++++
> 4 files changed, 65 insertions(+), 2 deletions(-)
>
> diff --git a/builtin/fetch.c b/builtin/fetch.c
> index 1b1f039..14aab71 100644
> --- a/builtin/fetch.c
> +++ b/builtin/fetch.c
> @@ -18,6 +18,7 @@
> #include "argv-array.h"
> #include "utf8.h"
> #include "packfile.h"
> +#include "list-objects-filter-options.h"
>
> static const char * const builtin_fetch_usage[] = {
> N_("git fetch [<options>] [<repository> [<refspec>...]]"),
> @@ -55,6 +56,7 @@ static int recurse_submodules_default = RECURSE_SUBMODULES_ON_DEMAND;
> static int shown_url = 0;
> static int refmap_alloc, refmap_nr;
> static const char **refmap_array;
> +static struct list_objects_filter_options filter_options;
>
> static int git_fetch_config(const char *k, const char *v, void *cb)
> {
> @@ -160,6 +162,7 @@ static struct option builtin_fetch_options[] = {
> TRANSPORT_FAMILY_IPV4),
> OPT_SET_INT('6', "ipv6", &family, N_("use IPv6 addresses only"),
> TRANSPORT_FAMILY_IPV6),
> + OPT_PARSE_LIST_OBJECTS_FILTER(&filter_options),Documentation is missing. Please add something to git-fetch.txt (or fetch-options.txt) about this option. I would make a patch but I don't know enough about this to write and I'm in the middle of something else.
-- Duy