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

fix: broken annotated commit detection #183

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nickajacks1
Copy link

Annotated commits have their own object hash in addition to the commit hash. gitRepo.Tag() returns the hash of the tag instead of the commit. If this resulting hash is passed to CommitsBetween, as is done in chglog add, the hash will never be found. Update GitHashFotTag to return the commit hash if the tag is an annotated tag.

This fixes an issue where chglog add adds the entire git history when annotated tags are used.

Annotated commits have their own object hash in addition to the commit
hash. gitRepo.Tag() returns the hash of the tag instead of the commit.
If this resulting hash is passed to CommitsBetween, as is done in
`chglog add`, the hash will never be found. Update GitHashFotTag to
return the commit hash if the tag is an annotated tag.

This fixes an issue where `chglog add` adds the entire git history when
annotated tags are used.
@nickajacks1
Copy link
Author

Removed files accidentally added to branch

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

Successfully merging this pull request may close these issues.

1 participant