Thread (3 messages) 3 messages, 2 authors, 2025-02-11

Re: [Outreachy][PATCH v2] builtin/update-server-info: remove the_repository global variable

From: Patrick Steinhardt <hidden>
Date: 2025-02-11 07:43:38

On Mon, Feb 10, 2025 at 11:40:30PM +0530, Usman Akinyemi wrote:
Remove the_repository global variable in favor of the repository
argument that gets passed in "builtin/update-server-info.c".

When `-h` is passed to the command outside a Git repository, the
`run_builtin()` will call the `cmd_update_server_info()` function
with `repo` set to NULL and then early in the function, "parse_options()"
call will give the options help and exit, without having to consult much
of the configuration file. So it is safe to omit reading the config when
`repo` argument the caller gave us is NULL.
Thanks, this version looks good to me.

Patrick
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help