chelnak / gh-changelog

A gh cli extension that will make your changelogs ✨
MIT License
110 stars 4 forks source link

gitclient.GetFirstCommit() can return two SHAs #73

Closed chelnak closed 2 years ago

chelnak commented 2 years ago

Currently GetFirstCommit calls git rev-list --max-parents=0 HEAD.

It turns out that this can return to SHAs, which then breaks the downstream calls to git.

chelnak commented 2 years ago

It returns n hashes because the command does as it says.. return info on the commits with 0 parents.

In this case the repository had two parentless commits for some reason.

It's probably sensible to warn and take the oldest.