Re: [PATCH v7 2/6] fetch-pack: refactor packet writing
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Nov 25, 2024, 09:51 UTC
- Message-ID
- <Z0RIqUAoEob8lGfM@pks.im>
- In-Reply-To
- <20241125053616.25170-3-eric.peijian@gmail.com>
On Mon, Nov 25, 2024 at 12:36:12AM -0500, Eric Ju wrote:
Show 12 quoted lines
> diff --git a/connect.h b/connect.h > index 1645126c17..8b56a68b62 100644 > --- a/connect.h > +++ b/connect.h > @@ -1,6 +1,7 @@ > #ifndef CONNECT_H > #define CONNECT_H > > +#include "string-list.h" > #include "protocol.h" > > #define CONNECT_VERBOSE (1u << 0)
Instead of including this header, you can add a forward declaration of `struct string_list`. This is mostly done to keep compilation times at bay by not including too many headers.
Show 6 quoted lines
> @@ -30,4 +31,11 @@ void check_stateless_delimiter(int stateless_rpc, > struct packet_reader *reader, > const char *error); > > +/** > + * write_command_and_capabilities writes a command along with the requested
Nit: we don't typically use Go-style comments where the comment starts with the name of what's being documented.
Patrick