git: 70e64ba44941 - main - release.sh: Update GITROOT URL

Ryan Libby rlibby at freebsd.org
Wed Dec 30 21:06:59 UTC 2020


On Wed, Dec 30, 2020 at 11:00 AM Warner Losh <imp at bsdimp.com> wrote:
>
> On Wed, Dec 30, 2020 at 5:04 AM Rodney W. Grimes <freebsd at gndrsh.dnsmgr.net>
> wrote:
<snip>
> > Now what is being just shoved off as nothing is the fact without
> > $FreeBSD$ working the ability to backtrace cadence of a file is
> > going to be a royal pain in the ass, and basically means the project
> > has "lost" versioning of installed product.
> >
>
> You can commit the file you have to a temporary branch, and use a simple
> loop to find the file that's closest to it in the main branch with git
> tools. It's not that hard and covered in several stack trace posts. It's
> far more reliable than $FreeBSD$ since it will show the version that's the
> closest to the one you have, in case you moved other later changes in w/o
> updating $FreeBSD$.

If there's a need for this, it might be useful to describe in or link
from the freebsd-git-docs.

For exact matches, this almost works:

git describe $(git hash-object $file)

but not for all branches, I think for git describe $blob you have to be
on a branch with the blob in history.  It might also come with some
caveats about the hash format.  We might be able either to add some glue
around that or work with git upstream.

Having a tool to find fuzzy matches would be neat (the blob with the
minimum diff).  Does one exist?

Ryan


More information about the dev-commits-src-main mailing list