Skip to content

Total number of commits count changed semantics #164

@ibbem

Description

@ibbem

During work on #163, I noticed that the InvocationCounter in the Analysis which counts all commits in the repository (even filtered ones) is never used. This is due to 36dc1bb which left that artifact behind.

However, the semantics changed slightly:
Previously, it counted the commits before the DiffFilter.
Now, it only counts commits after the DiffFilter.
We should decide which behavior is actually intended and document it as such.

Note that the documentation contains some improvement potential in this regard:

Furthermore, there is a bug in Analysis.forSingleCommit: It increases the total commits although this is already done in processCommit. So the result will have a total commit count of 2. (Note that I didn't test this. This is just my mental model of the code.)

Regarding FilterAnalysis: This could in principle replace DiffFilter as implied by the comment in FilterAnalysis. For commits, this would already work. For patches, we would need to introduce a new hook, something like beginParsePatch (because commits are fully parsed before beginPatch is ever called), and do a bunch of refactorings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions