Skip to content

🐛 fix(parser): handle deduplicate commit messsage#14

Merged
anIcedAntFA merged 1 commit intomainfrom
fix/commit-messsage-repeated-when-log-all-branches
Jan 22, 2026
Merged

🐛 fix(parser): handle deduplicate commit messsage#14
anIcedAntFA merged 1 commit intomainfrom
fix/commit-messsage-repeated-when-log-all-branches

Conversation

@lazarus2019
Copy link
Copy Markdown
Collaborator

📝 Description

  • Fix duplicate commit messages appearing when using --all-branches flag.
  • Added a Deduplicate function in the parser package to remove commits with identical messages, keeping only the first occurrence.

Changes:

  • Added Deduplicate() method to parser Service that filters out duplicate commit messages
  • Integrated deduplication into the main pipeline after parsing commits
  • Added unit tests for the new functionality

🔗 Related Issue

Fix #13

Closes #13

👥 Reviewers

@anIcedAntFA

🎯 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • ♻️ Code refactoring (no functional changes)
  • 🎨 Style/UI update
  • ⚡ Performance improvement
  • ✅ Test update
  • 🔧 Configuration update (CI/CD, linters, build tools)
  • 🧹 Chore (dependencies, cleanup, maintenance)
  • 🔒 Security fix
  • ♿ Accessibility improvement

🧪 How Has This Been Tested?

  • Unit tests
  • Integration tests
  • Manual testing

Test Configuration:

  • OS: Arch Linux
  • Go version: go version go1.24.6 linux/amd64

📸 Screenshots (if applicable)

Place screenshot here

✅ Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have run gofumpt -l -w . to format my code
  • I have run golangci-lint run and fixed any issues

📚 Additional Notes

@lazarus2019 lazarus2019 self-assigned this Jan 15, 2026
@lazarus2019 lazarus2019 added the bug Something isn't working label Jan 15, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 15, 2026

Codecov Report

❌ Patch coverage is 9.09091% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/parser/parser.go 10.00% 9 Missing ⚠️
cmd/gohome/cmd/report.go 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@lazarus2019 lazarus2019 force-pushed the fix/commit-messsage-repeated-when-log-all-branches branch from 7c1695b to 12398d3 Compare January 15, 2026 11:05
Comment thread internal/parser/parser.go
@anIcedAntFA
Copy link
Copy Markdown
Owner

anIcedAntFA commented Jan 15, 2026

Thank you for your contribution 🚀. I am very appreciated !

Note: you should config user name and email locally for better and security

git config --local user.name "ngockhoi96"
git config --local user.email "anicedfaant@gmail.com"

@lazarus2019 lazarus2019 force-pushed the fix/commit-messsage-repeated-when-log-all-branches branch 3 times, most recently from cd923ee to 66d03a3 Compare January 22, 2026 01:27
@lazarus2019 lazarus2019 force-pushed the fix/commit-messsage-repeated-when-log-all-branches branch from 66d03a3 to d693dc9 Compare January 22, 2026 01:37
@anIcedAntFA anIcedAntFA merged commit 446fdd2 into main Jan 22, 2026
6 of 7 checks passed
@anIcedAntFA anIcedAntFA deleted the fix/commit-messsage-repeated-when-log-all-branches branch January 22, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] There are many repeat commit message when using --all-branches flag

2 participants