1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-09 14:56:07 +02:00
git/contrib/coccinelle/the_repository.pending.cocci
Stefan Beller 9e5252abd1 commit: allow parse_commit* to handle any repo
Just like the previous commit, parse_commit and friends are used a lot
and are found in new patches, so we cannot change their signature easily.

Re-introduce these function prefixed with 'repo_' that take a repository
argument and keep the original as a shallow macro.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-14 17:22:40 +09:00

67 lines
960 B
Plaintext

// This file is used for the ongoing refactoring of
// bringing the index or repository struct in all of
// our code base.
@@
expression E;
expression F;
expression G;
@@
- read_object_file(
+ repo_read_object_file(the_repository,
E, F, G)
@@
expression E;
@@
- has_sha1_file(
+ repo_has_sha1_file(the_repository,
E)
@@
expression E;
expression F;
@@
- has_sha1_file_with_flags(
+ repo_has_sha1_file_with_flags(the_repository,
E)
@@
expression E;
@@
- has_object_file(
+ repo_has_object_file(the_repository,
E)
@@
expression E;
expression F;
@@
- has_object_file_with_flags(
+ repo_has_object_file_with_flags(the_repository,
E)
@@
expression E;
expression F;
expression G;
@@
- parse_commit_internal(
+ repo_parse_commit_internal(the_repository,
E, F, G)
@@
expression E;
expression F;
@@
- parse_commit_gently(
+ repo_parse_commit_gently(the_repository,
E, F)
@@
expression E;
@@
- parse_commit(
+ repo_parse_commit(the_repository,
E)