Is there a way to find out which git commit the repos were built on?

From: Mel Pilgrim <>
Date: Sun, 01 Jan 2023 20:25:40 UTC
I asked this a long time ago, back when FreeBSD was still on Subversion, 
and the answer back then was "not really".  Has that changed?

What I need is the ability to retrieve the output of git log -1 
--format=%h run against the ports tree clone was used to build what is 
currently in the repos.