Re: [PATCH v2] builtin: allow passing custom data to sub-commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 26, 2024 at 12:19:22PM +0100, Karthik Nayak wrote:
> In 9b1cb5070f (builtin: add a repository parameter for builtin
> functions, 2024-09-13) the repository was passed down to all builtin
> commands. This allowed the repository to be passed down to lower layers
> without depending on the global `the_repository` variable.
> 
> To remove usage of global variables like `the_repository` in
> sub-commands, it makes sense to pass down the repository value from the
> commands to the sub-commands. But let's make it more generic and modify
> `parse_opt_subcommand_fn` to instead take a `void *` value. This way we
> can provide custom structures to each sub-command.
> 


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux