]> git.ipfire.org Git - thirdparty/git.git/commit
cocci: introduce rules to transform "refs" to pass ref store
authorPatrick Steinhardt <ps@pks.im>
Tue, 7 May 2024 07:11:48 +0000 (09:11 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 7 May 2024 17:06:59 +0000 (10:06 -0700)
commitb198ee0b3d4f4471241d31863e7902ecf24955f7
treeef2a0b20daf6cf88da3ba918320a0ea636536529
parent54876c6dfba771612245cf57b2217c5b00ced29d
cocci: introduce rules to transform "refs" to pass ref store

Most of the functions in "refs.h" have two flavors: one that accepts a
`struct ref_store`, and one that figures it out via `the_repository`.
As part of the libification efforts we want to get rid of the latter
variant and stop relying on `the_repository` altogether.

Introduce a set of Coccinelle rules that transform callers of the "refs"
interfaces to pass a `struct ref_store`. These rules are not yet applied
by this patch so that it can be reviewed standalone more easily. This
will be done in the next patch.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/coccinelle/refs.cocci [new file with mode: 0644]