FreshPorts & src commits to branches

Dan Langille dan at
Tue Aug 18 01:19:51 UTC 2020


I am quickly realizing that in order for FreshPorts to track src commits it needs to query every branch. There does not seem to be any other way to know that a commit ocurred on stable/12 without a checkout of stable/12

On that note, I'm not sure how far to go back.

I see MFH commits into stable7, 8, 9, and 10.

Is there a way to know a commit has occurred without having looking at the branch?

Yes, use the GitHub API. I have been able to pull that information out, we can get the commit hash, but not the branch name.  Regardless, I am hesitant to tie FreshPorts into Github, especially for its vital data: commits.

How about those emails? Can we get the commit emails up and running for git?

With an email, we can see a commit occurred on stable/7, we have the commit hash. Do we have stable/7 checked out? No, we can checkout that branch and use it.

Similarly, a commit hook which passed along the commit hash and the branch, that would be enough. Actually, having both the emails and the commit hook would cover the bases well.

For those unaware, FreshPorts has been using commit emails as its primary data point for 20 years.[1] Code has been developed to harvest commit information from git[2]. Knowing the commit hash, we can grab the data, convert it to XML, and load it into the database. But only if we also know the branch.

[1] -
[2] -

  Dan Langille
  dan at

More information about the freebsd-git mailing list