diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2016-06-12 17:54:04 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-06-13 14:38:16 -0700 |
commit | a45a260086b395729e3c26c9680602e1352184b5 (patch) | |
tree | 4fab7f0bedb5b0c16ded43c7a12465159e941240 /builtin/fetch-pack.c | |
parent | upload-pack: support define shallow boundary by excluding revisions (diff) | |
download | tgif-a45a260086b395729e3c26c9680602e1352184b5.tar.xz |
fetch: define shallow boundary with --shallow-exclude
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/fetch-pack.c')
-rw-r--r-- | builtin/fetch-pack.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c index 0402e2756b..07570bee2d 100644 --- a/builtin/fetch-pack.c +++ b/builtin/fetch-pack.c @@ -50,6 +50,7 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix) struct child_process *conn; struct fetch_pack_args args; struct sha1_array shallow = SHA1_ARRAY_INIT; + struct string_list deepen_not = STRING_LIST_INIT_DUP; packet_trace_identity("fetch-pack"); @@ -108,6 +109,10 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix) args.deepen_since = xstrdup(arg); continue; } + if (skip_prefix(arg, "--shallow-exclude=", &arg)) { + string_list_append(&deepen_not, arg); + continue; + } if (!strcmp("--no-progress", arg)) { args.no_progress = 1; continue; @@ -135,6 +140,8 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix) } usage(fetch_pack_usage); } + if (deepen_not.nr) + args.deepen_not = &deepen_not; if (i < argc) dest = argv[i++]; |