Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: leverage reuse vcs Git strategy #217

Merged
merged 2 commits into from
Aug 7, 2024
Merged

Conversation

SMoraisAnsys
Copy link
Contributor

Duplicate of #216 which was opened from a fork...


Seems like a big overhead when using add-license-header is related to the fact that we also handle (uselessly) files and directory ignored by version control. This PR adds VCSStrategyGit which should handle Git related ignores when checking a repo.

I did a test with this branch on pyaedt and the restitution time difference is huge.

Using

- repo: https://github.com/SMoraisAnsys/pre-commit-hooks
  rev: feat/use-reuse-ignore-vcs

took seconds when a file was modified while the using the current pre-commit-hooks takes minute(s)

- repo: https://github.com/ansys/pre-commit-hooks
  rev: v0.4.2

If this PR gets merged we should close #215
Closes #214

@github-actions github-actions bot added the enhancement New features or code improvements label Aug 7, 2024
@RobPasMue
Copy link
Member

@klmcadams feel free to review and merge when you want. We should do a release right after and close #215 and #214

@klmcadams klmcadams merged commit 7c1f31a into main Aug 7, 2024
34 checks passed
@klmcadams klmcadams deleted the feat/use-reuse-ignore-vcs branch August 7, 2024 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or code improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improving add_license_header performance
4 participants