]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/prune: stop depending on 'the_repository'
authorAyush Chandekar <ayu.chandekar@gmail.com>
Fri, 4 Jul 2025 14:12:35 +0000 (19:42 +0530)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Jul 2025 15:31:13 +0000 (08:31 -0700)
commit7cd03a555a0d951759a5bce201ad0686c0fc8b12
treee33021de5f60454949fa803e7e10c5a0a5a38602
parent44e300a97480ef272a596e02b912b72528043193
builtin/prune: stop depending on 'the_repository'

Refactor builtin/prune.c to remove the dependency on the global
'the_repository'. Replace all the occurrences of 'the_repository' with
repo and thus remove the definition '#define
USE_THE_REPOSITORY_VARIABLE'. Also, add a test to make sure that 'git
prune -h' can be called when the repository is `NULL`.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Ghanshyam Thakkar <shyamthakkar001@gmail.com>
Signed-off-by: Ayush Chandekar <ayu.chandekar@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/prune.c
t/t1517-outside-repo.sh