summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-11-14 00:12:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-14 08:22:40 (GMT)
commit9e5252abd1239215c36f86704e84ba06dc30583f (patch)
tree019d93f691b7a9b5fd9604bbe3bf8dd114ea095a /contrib
parentd1a69022650bbb6a56ebe93a28fe8b0e6a8d7fa7 (diff)
downloadgit-9e5252abd1239215c36f86704e84ba06dc30583f.zip
git-9e5252abd1239215c36f86704e84ba06dc30583f.tar.gz
git-9e5252abd1239215c36f86704e84ba06dc30583f.tar.bz2
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>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/coccinelle/the_repository.pending.cocci24
1 files changed, 24 insertions, 0 deletions
diff --git a/contrib/coccinelle/the_repository.pending.cocci b/contrib/coccinelle/the_repository.pending.cocci
index 46f3a1b..b185fe0 100644
--- a/contrib/coccinelle/the_repository.pending.cocci
+++ b/contrib/coccinelle/the_repository.pending.cocci
@@ -40,3 +40,27 @@ 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)