diff mbox series

[03/17] cocci: sort "the_repository" rules by header

Message ID patch-03.17-34c6b8afd6c-20230317T152724Z-avarab@gmail.com (mailing list archive)
State Accepted
Commit 5978de20319602ae18d2b8241aa6f59f3f04f198
Headers show
Series cocci: remove "the_index" wrapper macros | expand

Commit Message

Ævar Arnfjörð Bjarmason March 17, 2023, 3:35 p.m. UTC
Sort the "the_repository.pending.cocci" file by which header the
macros are in, and add a comment to that effect in front of the
rules. This will make subsequent commits easier to follow, as we'll be
applying these rules on a header-by-header basis.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 .../coccinelle/the_repository.pending.cocci   | 34 +++++++++++--------
 1 file changed, 19 insertions(+), 15 deletions(-)

Comments

Elijah Newren March 19, 2023, 5:59 a.m. UTC | #1
On Fri, Mar 17, 2023 at 9:16 AM Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
>
> Sort the "the_repository.pending.cocci" file by which header the
> macros are in, and add a comment to that effect in front of the
> rules. This will make subsequent commits easier to follow, as we'll be
> applying these rules on a header-by-header basis.

Is this at risk of becoming out-of-date with en/header-cleanup or my
second series over at https://github.com/gitgitgadget/git/pull/1493
that I'm planning to submit soon?  It doesn't look like you're adding
any comments pointing at cache.h, and I'm mostly moving stuff out of
there, but I'm just curious if we are risking adding
likely-to-become-stale comments.

>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
>  .../coccinelle/the_repository.pending.cocci   | 34 +++++++++++--------
>  1 file changed, 19 insertions(+), 15 deletions(-)
>
> diff --git a/contrib/coccinelle/the_repository.pending.cocci b/contrib/coccinelle/the_repository.pending.cocci
> index 99e192736ee..84b79dce480 100644
> --- a/contrib/coccinelle/the_repository.pending.cocci
> +++ b/contrib/coccinelle/the_repository.pending.cocci
> @@ -5,21 +5,7 @@
>  @@
>  @@
>  (
> -- read_object_file
> -+ repo_read_object_file
> -|
> -- has_object_file
> -+ repo_has_object_file
> -|
> -- has_object_file_with_flags
> -+ repo_has_object_file_with_flags
> -|
> -- parse_commit_internal
> -+ repo_parse_commit_internal
> -|
> -- parse_commit
> -+ repo_parse_commit
> -|
> +// commit-reach.h
>  - get_merge_bases
>  + repo_get_merge_bases
>  |
> @@ -34,6 +20,13 @@
>  |
>  - in_merge_bases_many
>  + repo_in_merge_bases_many
> +// commit.h
> +|
> +- parse_commit_internal
> ++ repo_parse_commit_internal
> +|
> +- parse_commit
> ++ repo_parse_commit
>  |
>  - get_commit_buffer
>  + repo_get_commit_buffer
> @@ -43,6 +36,17 @@
>  |
>  - logmsg_reencode
>  + repo_logmsg_reencode
> +// object-store.h
> +|
> +- read_object_file
> ++ repo_read_object_file
> +|
> +- has_object_file
> ++ repo_has_object_file
> +|
> +- has_object_file_with_flags
> ++ repo_has_object_file_with_flags
> +// pretty.h
>  |
>  - format_commit_message
>  + repo_format_commit_message
> --
> 2.40.0.rc1.1034.g5867a1b10c5

Other than the minor comment above, things all make sense.
diff mbox series

Patch

diff --git a/contrib/coccinelle/the_repository.pending.cocci b/contrib/coccinelle/the_repository.pending.cocci
index 99e192736ee..84b79dce480 100644
--- a/contrib/coccinelle/the_repository.pending.cocci
+++ b/contrib/coccinelle/the_repository.pending.cocci
@@ -5,21 +5,7 @@ 
 @@
 @@
 (
-- read_object_file
-+ repo_read_object_file
-|
-- has_object_file
-+ repo_has_object_file
-|
-- has_object_file_with_flags
-+ repo_has_object_file_with_flags
-|
-- parse_commit_internal
-+ repo_parse_commit_internal
-|
-- parse_commit
-+ repo_parse_commit
-|
+// commit-reach.h
 - get_merge_bases
 + repo_get_merge_bases
 |
@@ -34,6 +20,13 @@ 
 |
 - in_merge_bases_many
 + repo_in_merge_bases_many
+// commit.h
+|
+- parse_commit_internal
++ repo_parse_commit_internal
+|
+- parse_commit
++ repo_parse_commit
 |
 - get_commit_buffer
 + repo_get_commit_buffer
@@ -43,6 +36,17 @@ 
 |
 - logmsg_reencode
 + repo_logmsg_reencode
+// object-store.h
+|
+- read_object_file
++ repo_read_object_file
+|
+- has_object_file
++ repo_has_object_file
+|
+- has_object_file_with_flags
++ repo_has_object_file_with_flags
+// pretty.h
 |
 - format_commit_message
 + repo_format_commit_message