summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar Stefan Beller <sbeller@google.com>2018-11-13 16:12:55 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-11-14 17:22:40 +0900
commit21a9651ba3fb350f48a53bf885a225bf6b71cac3 (patch)
tree16609455ca583bc2ee0fd839e35fe8772091939e /contrib
parentcommit-reach.c: allow get_merge_bases_many_0 to handle any repo (diff)
downloadtgif-21a9651ba3fb350f48a53bf885a225bf6b71cac3.tar.xz
commit-reach: prepare get_merge_bases to handle any repo
Similarly to previous patches, the get_merge_base functions are used often in the code base, which makes migrating them hard. Implement the new functions, prefixed with 'repo_' and hide the old functions behind a wrapper macro. 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.cocci26
1 files changed, 26 insertions, 0 deletions
diff --git a/contrib/coccinelle/the_repository.pending.cocci b/contrib/coccinelle/the_repository.pending.cocci
index b185fe0a1d..f6c2915a4e 100644
--- a/contrib/coccinelle/the_repository.pending.cocci
+++ b/contrib/coccinelle/the_repository.pending.cocci
@@ -64,3 +64,29 @@ expression E;
- parse_commit(
+ repo_parse_commit(the_repository,
E)
+
+@@
+expression E;
+expression F;
+@@
+- get_merge_bases(
++ repo_get_merge_bases(the_repository,
+ E, F);
+
+@@
+expression E;
+expression F;
+expression G;
+@@
+- get_merge_bases_many(
++ repo_get_merge_bases_many(the_repository,
+ E, F, G);
+
+@@
+expression E;
+expression F;
+expression G;
+@@
+- get_merge_bases_many_dirty(
++ repo_get_merge_bases_many_dirty(the_repository,
+ E, F, G);