Re: [PATCH v2] fetch —object-info-format: client option for object-info
- From
Philip Oakley <philipoakley@iee.email>
- Date
- Feb 9, 2022, 12:48 UTC
- Message-ID
- <e21c4f77-061c-d125-97cb-1a8cb7692e56@iee.email>
- In-Reply-To
- <20220208235631.732466-1-calvinwan@google.com>
On 08/02/2022 23:56, Calvin Wan wrote:
Show 50 quoted lines
> Add ‘—object-info-format’ option to fetch. This option allows
> the client to make an object-info [1] command request to a server
> that supports protocol v2.
>
> The transport implementation uses vtables [2], similar to how Git
> fetches refs, to determine whether a process needs to be taken over
> before sending the object-info request. Different protocols
> require different setups for making requests.
>
> [1] https://lore.kernel.org/git/20210420233830.2181153-1-bga@google.com/
> [2] https://lore.kernel.org/git/26f276956001a120cc9105b0071762c2fd4a45c5.15=
> 13287544.git.jonathantanmy@google.com/
>
> Helped-by: Jonathan Tan <jonathantanmy@google.com>
> Signed-off-by: Calvin Wan <calvinwan@google.com>
>
> ---
> Please ignore the patch above. It was sent with a stale patch message.
> builtin/fetch.c | 26 ++++++++++++
> fetch-pack.c | 53 +++++++++++++++++++++++
> fetch-pack.h | 7 ++++
> t/t5583-fetch-object-info.sh | 81 ++++++++++++++++++++++++++++++++++++
> transport-helper.c | 12 ++++++
> transport-internal.h | 1 +
> transport.c | 59 ++++++++++++++++++++++++++
> transport.h | 1 +
> 8 files changed, 240 insertions(+)
> create mode 100755 t/t5583-fetch-object-info.sh
>
> diff --git a/builtin/fetch.c b/builtin/fetch.c
> index 5f06b21f8e..b48d9e93d0 100644
> --- a/builtin/fetch.c
> +++ b/builtin/fetch.c
> @@ -29,6 +29,9 @@
> #include "commit-graph.h"
> #include "shallow.h"
> #include "worktree.h"
> +#include "protocol.h"
> +#include "pkt-line.h"
> +#include "connect.h"
>
> #define FORCED_UPDATES_DELAY_WARNING_IN_MS (10 * 1000)
>
> @@ -37,6 +40,7 @@ static const char * const builtin_fetch_usage[] = {
> N_("git fetch [<options>] <group>"),
> N_("git fetch --multiple [<options>] [(<repository> | <group>)...]"),
> N_("git fetch --all [<options>]"),
> + N_("git fetch --object-info-format=[<arguments>] <remote> [<object-ids>]"),
> NULL
> };Doesn't this also need a matching Documentarian update for the option? -- Philip