Re: [PATCH 21/26] fetch: define shallow boundary with --shallow-exclude

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

 



On Wed, Apr 13, 2016 at 8:55 AM, Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> wrote:
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
> ---
> diff --git a/builtin/fetch.c b/builtin/fetch.c
> @@ -41,6 +41,7 @@ static int max_children = 1;
> +static struct string_list deepen_not = STRING_LIST_INIT_NODUP;
> @@ -50,6 +51,13 @@ static int shown_url = 0;
> +static int option_parse_deepen_not(const struct option *opt,
> +                                  const char *arg, int unset)
> +{
> +       string_list_append(&deepen_not, arg);
> +       return 0;
> +}
> +
> @@ -118,6 +126,9 @@ static struct option builtin_fetch_options[] = {
>                    N_("deepen history of shallow clone")),
>         OPT_STRING(0, "shallow-since", &deepen_since, N_("time"),
>                    N_("deepen history of shallow repository based on time")),
> +       { OPTION_CALLBACK, 0, "shallow-exclude", NULL, N_("revision"),
> +                   N_("deepen history of shallow clone by excluding rev"),
> +                   PARSE_OPT_NONEG, option_parse_deepen_not },

Is this a candidate for OPT_STRING_LIST()?

>         { OPTION_SET_INT, 0, "unshallow", &unshallow, NULL,
>                    N_("convert to a complete repository"),
>                    PARSE_OPT_NONEG | PARSE_OPT_NOARG, NULL, 1 },
--
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]