diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2018-07-03 00:39:44 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-07-04 00:00:41 +0200 |
commit | 3390e42adb3b84a9d61b3d46f4105f4cb6ba5edd (patch) | |
tree | 6d3b797117769e6c5a60d9fcd0b30bc7479d20f1 /fetch-pack.h | |
parent | fetch-pack: introduce negotiator API (diff) | |
download | git-3390e42adb3b84a9d61b3d46f4105f4cb6ba5edd.tar.xz git-3390e42adb3b84a9d61b3d46f4105f4cb6ba5edd.zip |
fetch-pack: support negotiation tip whitelist
During negotiation, fetch-pack eventually reports as "have" lines all
commits reachable from all refs. Allow the user to restrict the commits
sent in this way by providing a whitelist of tips; only the tips
themselves and their ancestors will be sent.
Both globs and single objects are supported.
This feature is only supported for protocols that support connect or
stateless-connect (such as HTTP with protocol v2).
This will speed up negotiation when the repository has multiple
relatively independent branches (for example, when a repository
interacts with multiple repositories, such as with linux-next [1] and
torvalds/linux [2]), and the user knows which local branch is likely to
have commits in common with the upstream branch they are fetching.
[1] https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next/
[2] https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux/
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fetch-pack.h')
-rw-r--r-- | fetch-pack.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fetch-pack.h b/fetch-pack.h index bb45a366a8..1859ee9275 100644 --- a/fetch-pack.h +++ b/fetch-pack.h @@ -16,6 +16,13 @@ struct fetch_pack_args { const struct string_list *deepen_not; struct list_objects_filter_options filter_options; const struct string_list *server_options; + + /* + * If not NULL, during packfile negotiation, fetch-pack will send "have" + * lines only with these tips and their ancestors. + */ + const struct oid_array *negotiation_tips; + unsigned deepen_relative:1; unsigned quiet:1; unsigned keep_pack:1; |