Skip to content

Skip third party unsupported headers. #232

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

Merged
merged 3 commits into from
Jun 4, 2025

Conversation

idimopoulos
Copy link
Contributor

We have a problem with some repositories when trying to parse the commit logs of the repository.
Apparently, come of the committers, are using third party tools (https://gitbutler.com/) which tampers with the log and adds additional metadata that might or might not exist before the commit message (might not = not committed with gitbutler).

I have added a method to skip lines until a new line is found in order to accommodate for this.

I have also provided a test (hashes and names are random but it is part of the logs we have encountered) that proves the problem.

@lyrixx
Copy link
Member

lyrixx commented Jun 4, 2025

Wo, I didn't know it was possible to do that. If there a public git with such header somewhere I can check?

@idimopoulos
Copy link
Contributor Author

@lyrixx sorry, I should have included that too. First time seeing this too. For us, the repository that had this is https://gitlab.opencode.de/open-code/badgebackend/badge-api
An example commit is https://gitlab.opencode.de/open-code/badgebackend/badge-api/-/commits/main?search=rename+docker-compose+to+compose

You can see it by cloning the repository I ran the following:

git clone https://gitlab.opencode.de/open-code/badgebackend/badge-api.git
cd badge-api
git log --pretty=format:%H | while read commit; do
  echo "=== $commit ==="
  git cat-file commit "$commit"
  echo
done

Search for the text "rename docker-compose to compose"

@lyrixx lyrixx merged commit fae9911 into gitonomy:main Jun 4, 2025
6 checks passed
@lyrixx
Copy link
Member

lyrixx commented Jun 4, 2025

Thanks

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

Successfully merging this pull request may close these issues.

2 participants