diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-04-04 10:56:23 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-04-04 10:56:23 -0700 |
commit | 0f5e8851737282c9dd342032fe9a2d8b10367c9a (patch) | |
tree | 916a4802b214e0c8a03548a166bb32b40200e89d /builtin/fetch-pack.c | |
parent | 1b54f5b89ac2efb5256b1870fabef28ea55e2f20 (diff) | |
parent | 4963d3e41fa454500760fe6f8fb1bab890c1c3eb (diff) |
Merge branch 'rc/fetch-refetch'
"git fetch --refetch" learned to fetch everything without telling
the other side what we already have, which is useful when you
cannot trust what you have in the local object store.
* rc/fetch-refetch:
docs: mention --refetch fetch option
fetch: after refetch, encourage auto gc repacking
t5615-partial-clone: add test for fetch --refetch
fetch: add --refetch option
builtin/fetch-pack: add --refetch option
fetch-pack: add refetch
fetch-negotiator: add specific noop initializer
Diffstat (limited to 'builtin/fetch-pack.c')
-rw-r--r-- | builtin/fetch-pack.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c index c4b9104f9b..f045bbbe94 100644 --- a/builtin/fetch-pack.c +++ b/builtin/fetch-pack.c @@ -153,6 +153,10 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix) args.from_promisor = 1; continue; } + if (!strcmp("--refetch", arg)) { + args.refetch = 1; + continue; + } if (skip_prefix(arg, ("--filter="), &arg)) { parse_list_objects_filter(&args.filter_options, arg); continue; |