On Mon, Feb 17, 2025 at 12:25 PM Patrick Steinhardt <ps@xxxxxx> wrote: > > 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. Thanks for the suggestion, I will use it in the next version. > > Patrick