Re: [PATCH GSoC v4 3/9] fetch-object-info: pass arguments directly instead of a struct
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 4, 2026, 20:44 UTC
- Message-ID
- <xmqqldalty3i.fsf@gitster.g>
- In-Reply-To
- <20260804-objecttype-support-v4-3-31511b0231be@gmail.com>
Pablo Sabater <pabloosabaterr@gmail.com> writes:
Show 20 quoted lines
> struct object_info_args groups three pointers that already live in the > transport and are given to fetch_object_info(). > Grouping them into a struct reduces the number of parameters, but it > suggests that the three belong together, when they are unrelated and end > up being accessed as args->* independently. > > Drop the struct and pass those parameters directly to > fetch_object_info() and send_object_info_request(). This should have no > change in behavior. > > Helped-by: Jeff King <peff@peff.net> > Helped-by: Junio C Hamano <gitster@pobox.com> > Mentored-by: Karthik Nayak <karthik.188@gmail.com> > Mentored-by: Chandra Pratap <chandrapratap3519@gmail.com> > Signed-off-by: Pablo Sabater <pabloosabaterr@gmail.com> > --- > fetch-object-info.c | 53 +++++++++++++++++++++++++++++++---------------------- > fetch-object-info.h | 17 ++++++++--------- > transport.c | 11 +++++------ > 3 files changed, 44 insertions(+), 37 deletions(-)
OK, in this iteration, the step is truly about just getting rid of the intermediate "args" structure and passing these three things separately, without any other changes like the (half) addition of "type" support like the previous iteration had.