Skip to content

"cloc --git-diff-rel --csv --by-file refs/tags/first-tag refs/tags/second-tag" returns a wrong number of records #864

Open
@EnricoPicci

Description

@EnricoPicci

Describe the bug
The command "cloc --git-diff-rel --csv --by-file refs/tags/first-tag refs/tags/second-tag" returns 3 record but the difference between "first-tag" and "second-tag" is only of 2 records.

cloc; OS; OS version

  • cloc version: 2.0
  • If running the cloc source, Perl version:
  • OS (eg Linux, Windows, macOS, etc): Ubuntu
  • OS version: 22.04.3 LTS

To Reproduce

  • Clone the repo https://github.com/EnricoPicci/gitlab-tools.git
  • Run the command "cloc --git-diff-rel --csv --by-file refs/tags/first-tag refs/tags/second-tag" -> this returns 3 records (2 records actually refer to the same file README.md)
  • Run the command "git diff refs/tags/first-tag refs/tags/second-tag --name-only" and this returns 2 files
  • Moreover the number of lines changed, deleted, added returned by "cloc --git-diff-rel" is wrong

Expected result
"cloc --git-diff-rel --csv --by-file refs/tags/first-tag refs/tags/second-tag" should return 2 records and the right number of lines changed, added, removed

Additional context
Add any other context about the problem here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions