Thread (81 messages) flat view 81 messages, 5 authors, 7h ago

Re: [PATCH GSoC v3 3/8] fetch-object-info: pass arguments directly instead of a struct

From: Pablo Sabater <hidden>
Date: 2026-08-04 15:34:40

On Tue Aug 4, 2026 at 5:23 PM CEST, Karthik Nayak wrote:
Pablo Sabater [off-list ref] writes:
quoted
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 fetch_object_info() uses all three of them.
But it does use all of them, no? Not sure I follow the reasoning here.

[snip]
Yes, I meant that it suggests the three of them are used together, but
in the end everything is accessed as args->*.

And because object_info_args is built just before calling
fetch_object_info() it doesn't make much sense.

citing Peff [1]:
- there are a lot of semi-opaque structs, like object_info_args. It
  would seem simpler to me to pass those elements around independently
  to the functions that need them. Likewise, we seem to stuff a lot of
  data into the transport struct rather than passing it to the
  relevant functions, even though many of those elements are really
  just used for one function call, and aren't a property of the
  transport at all.
[1]: https://lore.kernel.org/git/20260802154309.GA17844@coredump.intra.peff.net/ (local)

I'll reword it in the next reroll,
Pablo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help