FreshPorts & src commits to branches

Adriaan de Groot adridg at
Tue Aug 18 07:44:37 UTC 2020

On Tuesday, 18 August 2020 03:19:26 CEST Dan Langille wrote:
> 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

If you have the full repo (e.g. a normal clone) then you might be able to use 
something along this line:

git log --branches --since 2020-08-16 --source --raw | grep ^commit

(the important bit is --branches to include all of them, and --source to 
include the source). I don't have a FreeBSD repo at hand, but my work-repo 
(which currently has some other branch checked out) gives me this kind of 

commit 36cefe3be10c707a2cdfaedd14fddee5cda31f50 hotfix-
commit eb44d0c6be18c1ced99d5a8c1b1a6a1a0e653be2 hotfix-
commit 24efce0c1d5601a77ad2b919cf0cf387231add76 calamares
commit 5db4195b7e3e507a34f84e041b15a4aa86ed32da hotfix-
commit 34946ecdee90584caf255fcca732c021e1dc1832 hotfix-
commit 1a7b2668dc1e341b493990b99e9a0cc4530d32cd hotfix-

This gives me branches for each commit hash in the given range. The branches 
you see mentioned here diverged before the date range given. I can't say 
anything about performance, here -- my little test repo only has ~8000 commits 
going back six years.

(Turning this command-line into a collection of libgit calls is left as an 
exercise for the reader)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the freebsd-git mailing list