Re: [PATCH 5/7] builtin/ls-files: stop using `the_repository`

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

 



On Sat, Feb 15, 2025 at 04:27:21AM +0530, Usman Akinyemi wrote:
> Remove the_repository global variable in favor of the repository
> argument that gets passed in "builtin/ls-files.c".
> 
> When `-h` is passed to the command outside a Git repository, the
> `run_builtin()` will call the `cmd_ls_files()` function with `repo` set
> to NULL and then early in the function, `show_usage_with_options_if_asked()`
> call will give the options help and exit, without having to consult much
> of the configuration file.
> 
> Let's pass `repository` argument to `expand_objectsize()`,
> `show_ru_info()` functions to remove their dependency on the global
> `the_repository` variable.

This paragraph made my reading hickup a bit. How about:

    Pass the repository available in the calling context to both
    `expand_objectsize()` and `show_ru_info()` to remove their
    dependency on the global `the_repository` variable.

Patrick




[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