]> Kevux Git Server - rit/commit
builtin/pack-refs: stop using `the_repository`
authorUsman Akinyemi <usmanakinyemi202@gmail.com>
Fri, 7 Mar 2025 23:35:04 +0000 (05:05 +0530)
committerJunio C Hamano <gitster@pobox.com>
Sat, 8 Mar 2025 00:52:01 +0000 (16:52 -0800)
commit72fe8bfac832a1f1b9b7cdc4efa793c48e13933e
tree57796ff540ba583eaabd81a48ed1ca3ef740d03c
parent1c14b1aedec6e9307e0c73276b8c1c283413ea41
builtin/pack-refs: stop using `the_repository`

Remove the_repository global variable in favor of the repository
argument that gets passed in "builtin/pack-refs.c".

When `-h` is passed to the command outside a Git repository, the
`run_builtin()` will call the `cmd_pack_refs()` function with `repo` set
to NULL and then early in the function, `parse_options()` call will give
the options help and exit.

Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/pack-refs.c
t/t0610-reftable-basics.sh