summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-11-14 00:12:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-14 08:22:40 (GMT)
commit9b45f499818f505f8f7797c6d8f63a3bdccfa95f (patch)
treef7600e32ea37a701d689b28910e9c694720ae8da /contrib
parentafd69dcc21972d766211ac253af2c18384e93056 (diff)
downloadgit-9b45f499818f505f8f7797c6d8f63a3bdccfa95f.zip
git-9b45f499818f505f8f7797c6d8f63a3bdccfa95f.tar.gz
git-9b45f499818f505f8f7797c6d8f63a3bdccfa95f.tar.bz2
object-store: prepare has_{sha1, object}_file to handle any repo
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/coccinelle/the_repository.pending.cocci30
1 files changed, 30 insertions, 0 deletions
diff --git a/contrib/coccinelle/the_repository.pending.cocci b/contrib/coccinelle/the_repository.pending.cocci
index a7ac9e0..46f3a1b 100644
--- a/contrib/coccinelle/the_repository.pending.cocci
+++ b/contrib/coccinelle/the_repository.pending.cocci
@@ -10,3 +10,33 @@ 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)