From: Eric Sunshine Date: Sun, 05 Jun 2016 05:05:48 GMT Subject: Re: [PATCH 22/26] clone: define shallow clone boundary with --shallow-exclude Message-ID: In-Reply-To: <1460552110-5554-23-git-send-email-pclouds@gmail.com> On Wed, Apr 13, 2016 at 8:55 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/builtin/clone.c b/builtin/clone.c > @@ -44,6 +44,7 @@ static int deepen; > +static struct string_list option_not = STRING_LIST_INIT_NODUP; > @@ -52,6 +53,13 @@ static struct string_list option_config; > +static int option_parse_deepen_not(const struct option *opt, > + const char *arg, int unset) > +{ > + string_list_append(&option_not, arg); > + return 0; > +} > + > @@ -89,6 +97,9 @@ static struct option builtin_clone_options[] = { > N_("create a shallow clone of that depth")), > OPT_STRING(0, "shallow-since", &option_since, N_("time"), > N_("create a shallow clone since a specific 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 }, OPT_STRING_LIST()? > OPT_BOOL(0, "single-branch", &option_single_branch, > N_("clone only one branch, HEAD or --branch")), > OPT_STRING(0, "separate-git-dir", &real_git_dir, N_("gitdir"),